> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstpromoter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign contract document

> Sign one of the promoter's pending contract documents.



## OpenAPI

````yaml openapi-v2-affiliate-contract-documents POST /contract_documents/{id}/sign
openapi: 3.0.1
info:
  title: FirstPromoter Contract Documents API
  version: '1.0'
  description: API for managing affiliate contract documents
servers:
  - url: https://api.firstpromoter.com/api/v2/affiliate
security:
  - BearerAuth: []
paths:
  /contract_documents/{id}/sign:
    post:
      tags:
        - Contract Documents
      summary: Sign a document with id
      description: |-
        Signs a contract document with id 
         <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/affiliate/contract_documents/{id}/sign`</Tip>
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: Contract document ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ip:
                  type: string
                  description: IP address of the signer
      responses:
        '200':
          description: Signed document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDocument'
        '400':
          description: Invalid IP format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: >-
            Unauthorized — the API key is missing, wrong, regenerated or
            disabled (no JSON response body is returned), or the `Account-ID`
            header is missing.
          content:
            application/json:
              schema:
                type: object
              example: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: >-
        Account ID of the affiliate program, shown next to your API key under
        Profile → API & AI tools
      schema:
        type: string
        example: acc_123456
  schemas:
    ContractDocument:
      type: object
      properties:
        id:
          type: integer
        status:
          type: string
          enum:
            - signed
        signed_ip:
          type: string
        contract_version_id:
          type: integer
        signed_at:
          type: string
          format: date-time
        promoter:
          $ref: '#/components/schemas/Promoter'
        contract_version:
          $ref: '#/components/schemas/ContractVersion'
        contract:
          $ref: '#/components/schemas/Contract'
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        code:
          type: string
    Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    Promoter:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
        name:
          type: string
        profile:
          type: object
          properties:
            avatar:
              type: string
    ContractVersion:
      type: object
      properties:
        added_at:
          type: string
          format: date-time
        changes_made:
          type: string
          nullable: true
        external_link:
          type: string
          nullable: true
        content_hosted:
          type: boolean
    Contract:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your affiliate API key (Profile → API & AI tools in the affiliate
        dashboard), sent as `Authorization: Bearer {api_key}`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.