FairePlace Workers API

Endpoints reserved for Cloudflare workers (signature-orchestrator, etc.). These endpoints use API key authentication (`X-API-Key`) instead of Bearer API keys. They allow workers to: - Update individual signature statuses - Finalize signature documents - Synchronize state between workers and the database

GitHub OpenAPI

Operations 2

POST /leases/signatures/{document_signature_id}/complete/{signer_type} Complete an individual signature (Worker) #
POST /leases/signatures/{document_signature_id}/finalize Finalize a signature document (Worker) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/faireplace-com:faireplace-com-workers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

faireplace-com-workers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FairePlace Property Management Workers API
  description: 'Comprehensive API for managing properties, leases, tenants, and all aspects of real estate management.

    Built with Rust and Actix-web following hexagonal architecture principles.


    ## Authentication

    This API uses API keys for authentication with tenant-based isolation.


    ## Base URL

    - Production: `https://api.faireplace.com/api`'
  version: 1.0.0
  contact:
    name: FairePlace API Support
    email: api-support@faireplace.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.faireplace.com/api
  description: Production server
security:
- BearerAuth: []
tags:
- name: Workers
  description: 'Endpoints reserved for Cloudflare workers (signature-orchestrator, etc.).


    These endpoints use API key authentication (`X-API-Key`) instead of

    Bearer API keys. They allow workers to:

    - Update individual signature statuses

    - Finalize signature documents

    - Synchronize state between workers and the database'
paths:
  /leases/signatures/{document_signature_id}/complete/{signer_type}:
    post:
      operationId: completeIndividualSignature
      summary: Complete an individual signature (Worker)
      description: 'Updates the status of an individual signature_request as "COMPLETED" in the database.


        ## Usage

        This endpoint is called by the **signature-orchestrator** (Cloudflare worker) when an individual

        signer has completed their signature. It synchronizes the signature state in the database

        in real time.


        ## Signature flow

        1. A signer completes their signature in the signature-orchestrator

        2. The signature-orchestrator calls this endpoint to update the database

        3. The corresponding signature_request is updated with `COMPLETED` status

        4. If all signers have completed, the signature-orchestrator calls `POST /leases/signatures/{document_signature_id}/finalize`


        ## Authentication

        This endpoint uses an **API key** (`X-API-Key`) instead of a Bearer API key.

        Only authorized workers can call this endpoint.


        ## Benefits

        - **Real-time traceability**: Each signature is recorded upon completion

        - **Consistent state**: The database reflects the actual state at each step

        - **Robustness**: If the process fails, already completed signatures are saved

        - **Visibility**: The state of each individual signature can be viewed


        ## Prerequisites

        - The signature document must exist

        - A signature_request must exist for this document and this signer_type

        - The tenant_id must be provided in the `X-Tenant-ID` header'
      tags:
      - Workers
      security:
      - WorkerApiKey: []
      parameters:
      - name: document_signature_id
        in: path
        required: true
        description: Signature document ID
        schema:
          type: string
          format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
      - name: signer_type
        in: path
        required: true
        description: Signer type that has completed their signature
        schema:
          type: string
          enum:
          - proprietaire
          - locataire
          - agent_immobilier
        example: proprietaire
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteSignatureRequestRequest'
            example:
              signature_hash: abc123def456...
      responses:
        '200':
          description: Signature request completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompleteSignatureRequestResponse'
              example:
                success: true
                message: Signature request completed successfully
                document_signature_id: 550e8400-e29b-41d4-a716-446655440000
                signer_type: proprietaire
                signature_request_id: 550e8400-e29b-41d4-a716-446655440001
        '400':
          description: Invalid signer type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: 'Invalid signer type: invalid. Accepted values: proprietaire, locataire, agent_immobilier'
                  status: 400
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Missing X-API-Key header
                  status: 401
        '404':
          description: Signature document or signature_request not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                document_not_found:
                  summary: Signature document not found
                  value:
                    error:
                      code: NOT_FOUND
                      message: Signature document 550e8400-e29b-41d4-a716-446655440000 not found
                      status: 404
                signature_request_not_found:
                  summary: Signature request not found
                  value:
                    error:
                      code: NOT_FOUND
                      message: Signature request not found for document 550e8400-e29b-41d4-a716-446655440000 and signer_type proprietaire
                      status: 404
        '500':
          $ref: '#/components/responses/InternalServerError'
  /leases/signatures/{document_signature_id}/finalize:
    post:
      operationId: finalizeSignatureDocument
      summary: Finalize a signature document (Worker)
      description: 'Finalizes a signature document and activates the lease if all signatures are complete.


        ## Usage

        This endpoint is called by the **signature-orchestrator** (Cloudflare worker) when **all signers**

        have completed their signatures. It verifies that all signature_requests are complete and activates

        the lease if so.


        ## Finalization flow

        1. All signers have completed their signatures (via `POST /leases/signatures/{document_signature_id}/complete/{signer_type}`)

        2. The signature-orchestrator calls this endpoint to finalize the document

        3. The system verifies that all signature_requests are in `COMPLETED` status

        4. If all are complete:

        - The document is marked as `COMPLETED`

        - The lease changes to `ACTIVE` status

        - A finalization event is published

        5. If some signatures are not complete, the document is marked as `COMPLETED`

        but the lease remains in `PENDING_SIGNATURE`


        ## Authentication

        This endpoint uses an **API key** (`X-API-Key`) instead of a Bearer API key.

        Only authorized workers can call this endpoint.


        ## Important note

        The signature_requests must be updated individually via `POST /leases/signatures/{document_signature_id}/complete/{signer_type}`

        before calling this endpoint. This endpoint does not update the signature_requests, it only

        verifies them.


        ## Prerequisites

        - The signature document must exist

        - All signature_requests must be in `COMPLETED` status (updated individually)

        - The tenant_id must be provided in the `X-Tenant-ID` header

        - The final signed PDF URL must be provided'
      tags:
      - Workers
      security:
      - WorkerApiKey: []
      parameters:
      - name: document_signature_id
        in: path
        required: true
        description: Signature document ID to finalize
        schema:
          type: string
          format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinalizeDocumentSignatureRequest'
            example:
              signed_pdf_url: https://api.faireplace.com/api/media/serve/550e8400-e29b-41d4-a716-446655440003
              archive_url: https://api.faireplace.com/api/media/serve/550e8400-e29b-41d4-a716-446655440004
      responses:
        '200':
          description: Signature document finalized successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinalizeDocumentSignatureResponse'
              example:
                success: true
                message: Document signature finalized successfully
                document_signature_id: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: signed_pdf_url is required
                  status: 400
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_api_key:
                  summary: Missing API key
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Missing X-API-Key header
                      status: 401
                invalid_api_key:
                  summary: Invalid API key
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Invalid API key
                      status: 401
        '404':
          description: Signature document not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: NOT_FOUND
                  message: Signature document 550e8400-e29b-41d4-a716-446655440000 not found
                  status: 404
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CompleteSignatureRequestResponse:
      type: object
      description: 'Response after completing an individual signature.


        This response confirms that the signature_request has been updated

        with COMPLETED status in the database.

        '
      required:
      - success
      - message
      - document_signature_id
      - signer_type
      - signature_request_id
      properties:
        success:
          type: boolean
          description: Indicates whether the completion succeeded
          example: true
        message:
          type: string
          description: Confirmation message
          example: Signature request completed successfully
        document_signature_id:
          type: string
          format: uuid
          description: Signature document ID
          example: 550e8400-e29b-41d4-a716-446655440000
        signer_type:
          type: string
          description: Type of the signer who completed their signature
          enum:
          - proprietaire
          - locataire
          - agent_immobilier
          example: proprietaire
        signature_request_id:
          type: string
          format: uuid
          description: Updated signature_request ID
          example: 550e8400-e29b-41d4-a716-446655440001
    FinalizeDocumentSignatureResponse:
      type: object
      description: 'Response after finalizing a signature document.


        This response confirms that the document has been finalized and that the lease

        has been activated if all signatures were complete.

        '
      required:
      - success
      - message
      - document_signature_id
      properties:
        success:
          type: boolean
          description: Indicates whether the finalization succeeded
          example: true
        message:
          type: string
          description: Confirmation message
          example: Document signature finalized successfully
        document_signature_id:
          type: string
          format: uuid
          description: Finalized signature document ID
          example: 550e8400-e29b-41d4-a716-446655440000
    FinalizeDocumentSignatureRequest:
      type: object
      description: 'Request to finalize a signature document.


        This endpoint is called by the signature-orchestrator when all signers

        have finished their signatures. It verifies that all signatures are complete

        and activates the lease if so.

        '
      required:
      - signed_pdf_url
      properties:
        signed_pdf_url:
          type: string
          format: uri
          description: URL of the final signed PDF (containing all signatures)
          example: https://api.faireplace.com/api/media/serve/550e8400-e29b-41d4-a716-446655440003
        archive_url:
          type:
          - string
          - 'null'
          format: uri
          description: URL of the archived PDF with timestamping (optional)
          example: https://api.faireplace.com/api/media/serve/550e8400-e29b-41d4-a716-446655440004
      additionalProperties: false
    Error:
      type: object
      description: "The error envelope returned by every authenticated endpoint.\n\nTwo things are worth knowing before you write your error handling:\n\n- **`code` is a symbolic string, not a number.** The numeric HTTP status is\n  in `status`. Branch on `code`: it is stable, and show `message`, which\n  is written for humans and may be reworded without notice.\n- The public guest-signature endpoints use a **different, flatter shape**\n  (`{ \"error_code\": …, \"message\": … }`, no `error` wrapper), because they\n  are consumed by a page that has no session. Their responses document it\n  inline.\n\nThe `X-Request-Id` response header carries the request identifier: quote it\nwhen reporting a problem. It is a header, not a body field.\n"
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - status
          properties:
            code:
              type: string
              description: Stable symbolic code. Branch on this.
              enum:
              - NOT_FOUND
              - UNAUTHORIZED
              - VALIDATION_ERROR
              - DATABASE_ERROR
              - BUSINESS_ERROR
              - STORAGE_ERROR
              - CONFIG_ERROR
              - FORBIDDEN
              - CONFLICT
              - PARSE_ERROR
              - SERIALIZATION_ERROR
              - AUTHENTICATION_ERROR
              - AUTHORIZATION_ERROR
              - EXTERNAL_SERVICE_ERROR
              - RATE_LIMIT_EXCEEDED
              - PAYMENT_REQUIRED
              - PLAN_LIMIT_REACHED
              - GONE
              - BAD_REQUEST
              - INTERNAL_ERROR
              - INTERNAL_SERVER_ERROR
              example: NOT_FOUND
            message:
              type: string
              description: 'Human-readable explanation, most often in French. Safe to display,

                not safe to parse.

                '
              example: Lease not found
            status:
              type: integer
              description: The HTTP status code, repeated in the body.
              example: 404
            details:
              type: object
              additionalProperties: true
              description: 'Extra machine-readable context. Only present on some errors: on

                `RATE_LIMIT_EXCEEDED` it carries `retry_after_seconds`.

                '
              example:
                retry_after_seconds: 12
    CompleteSignatureRequestRequest:
      type: object
      description: 'Request to complete an individual signature.


        This endpoint is called by the signature-orchestrator when an individual signer

        has finished their signature. It updates the status of the corresponding

        signature_request in the database.

        '
      properties:
        signature_hash:
          type:
          - string
          - 'null'
          description: Signature hash for traceability (optional)
          example: abc123def456...
      additionalProperties: false
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key with fp_* prefix, passed as Bearer token
    WorkerApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    WorkerBearer:
      type: http
      scheme: bearer
      bearerFormat: Worker