FoPost Contacts API

The people behind the inbox, and the fields kept about them

GitHub OpenAPI

Operations 11

GET /v1/contacts List contacts #
POST /v1/contacts Create a contact #
POST /v1/contacts/import Import contacts from a CSV #
GET /v1/contacts/fields List custom fields #
POST /v1/contacts/fields Create a custom field #
PATCH /v1/contacts/fields/{id} Update a custom field #
DELETE /v1/contacts/fields/{id} Delete a custom field #
GET /v1/contacts/{id} Get a contact #
PATCH /v1/contacts/{id} Update a contact #
DELETE /v1/contacts/{id} Delete a contact #
GET /v1/contacts/{id}/conversations List a contact’s conversations #

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/fopost-com:fopost-com-contacts-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

fopost-com-contacts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FoPost Contacts API
  version: 1.0.0
  description: 'REST API for FoPost — schedule, publish, and analyze social media content across every connected platform.


    ## Authentication


    Programmatic access uses an API key sent in the `X-API-Key` header. Keys are created in the FoPost dashboard under **Developers → API Keys** and are limited to the scopes granted at creation. Requests from the FoPost dashboard use a JWT bearer token instead (`Authorization: Bearer `), which implicitly carries all scopes. Either method works on every endpoint in this document unless noted otherwise.


    ## Scopes


    Each operation lists its required scope (also machine-readable as `x-fopost-scope`): `posts` (includes publishing, deliveries, and media), `workspaces`, `accounts`, `labels`, `webhooks`, `analytics`, `automations`.


    ## Responses


    Every key in a response body and every query parameter is snake_case; request bodies keep the field names documented on each operation. The ads endpoints (`/v1/ads/*`) are the one exception and keep camelCase keys. A single resource is returned as the object itself (`201` on create); a collection is `{ "data": [...], "meta": {...} }`. A success with nothing to return is `204` with an empty body.


    ## Errors


    Errors return `{ "error": "", "message": "" }` with a matching HTTP status, including an unknown route (`404 not_found`) and a server fault (`500 internal_error`). `error` is a stable snake_case code; `message` is for humans and may change. Some errors include additional context fields. A feature that is not set up on this deployment answers `503 not_configured`; a malformed answer from an upstream provider answers `502 upstream_error`.


    ## Request ids


    Every response carries an `X-Request-Id` header. Quote it when contacting support about a specific request.


    ## Rate limiting


    Requests are rate limited per API key, per minute, with a ceiling set by the plan behind the key. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; exceeding the limit returns `429` with error code `too_many_requests`, a `retry_after` field and a `Retry-After` header. Mutating endpoints additionally require an active subscription and return `403` with error code `subscription_required` without one.


    ## Pagination


    Offset-paged lists accept `page` and `per_page` (1 to 100) and return `meta: { page, per_page, total, total_pages }`. Cursor-paged lists return `meta: { next_cursor, has_more }`; pass `next_cursor` back in the cursor parameter the operation documents until `has_more` is false. Lists that do not paginate return `{ "data": [...] }` with no `meta`.'
  contact:
    name: FoPost Support
    url: https://fopost.com/contact
  license:
    name: Proprietary
    url: https://fopost.com/terms
servers:
- url: https://api.fopost.com
  description: Production
security:
- ApiKeyAuth: []
- BearerAuth: []
- OAuth2: []
tags:
- name: Contacts
  description: The people behind the inbox, and the fields kept about them
paths:
  /v1/contacts:
    get:
      operationId: listContacts
      summary: List contacts
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'The people behind the inbox, most recently active first. Spans every workspace the caller belongs to unless `workspace_id` names one, in which case rows omit it.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: workspace_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Restrict to a single workspace the user belongs to
      - name: search
        in: query
        required: false
        schema:
          type: string
        description: Match a display name or a handle
      - name: platform
        in: query
        required: false
        schema:
          type: string
        description: Only contacts with a handle here
      - name: source
        in: query
        required: false
        schema:
          type: string
          enum:
          - inbox
          - radar
          - import
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
          minimum: 1
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          default: 25
          minimum: 1
          maximum: 100
    post:
      operationId: createContact
      summary: Create a contact
      tags:
      - Contacts
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Folds into the contact that already holds the first channel, so this can never produce a duplicate of someone the inbox has already filed.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContactRequest'
  /v1/contacts/import:
    post:
      operationId: importContacts
      summary: Import contacts from a CSV
      tags:
      - Contacts
      responses:
        '200':
          description: Import summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportContactsResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Every row folds into an existing contact when its handle is already on file, so importing the same file twice merges rather than duplicates.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportContactsRequest'
  /v1/contacts/fields:
    get:
      operationId: listCustomFields
      summary: List custom fields
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CustomField'
                required:
                - data
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'The columns this workspace keeps about its contacts, in display order.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: workspace_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
        description: Restrict to a single workspace the user belongs to
    post:
      operationId: createCustomField
      summary: Create a custom field
      tags:
      - Contacts
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomField'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: A field with that key already exists in this workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: Requires the `inbox` scope when using an API key.
      x-fopost-scope: inbox
      parameters:
      - name: workspace_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Restrict to a single workspace the user belongs to
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldRequest'
  /v1/contacts/fields/{id}:
    patch:
      operationId: updateCustomField
      summary: Update a custom field
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomField'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'The key and the type are fixed once created; the name and options are not.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Field id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomFieldRequest'
    delete:
      operationId: deleteCustomField
      summary: Delete a custom field
      tags:
      - Contacts
      responses:
        '204':
          description: Deleted
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Removes the field and every answer to it. This cannot be undone.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Field id
  /v1/contacts/{id}:
    get:
      operationId: getContact
      summary: Get a contact
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: Requires the `inbox` scope when using an API key.
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Contact id
    patch:
      operationId: updateContact
      summary: Update a contact
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: Requires the `inbox` scope when using an API key.
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Contact id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContactRequest'
    delete:
      operationId: deleteContact
      summary: Delete a contact
      tags:
      - Contacts
      responses:
        '204':
          description: Deleted
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Removes the contact and its field values. The messages they sent stay in the inbox, and a later message files them again. This cannot be undone.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Contact id
  /v1/contacts/{id}/conversations:
    get:
      operationId: listContactConversations
      summary: List a contact’s conversations
      tags:
      - Contacts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ContactConversation'
                required:
                - data
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'The threads this person appears in, newest first. Matched on their channels, so a contact merged from two handles brings both threads with it.


        Requires the `inbox` scope when using an API key.'
      x-fopost-scope: inbox
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Contact id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 100
components:
  responses:
    Unauthorized:
      description: Missing or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    ValidationError:
      description: Request body or parameters failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    RateLimited:
      description: Too many requests for this API key in the current minute. The body carries `retry_after` (seconds) and the response carries `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotFound:
      description: Resource not found or not accessible to the authenticated user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Forbidden:
      description: The API key lacks the required scope, or a mutating route was called without an active subscription (`subscription_required`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  schemas:
    CreateContactRequest:
      type: object
      properties:
        workspace_id:
          type: string
          format: uuid
        display_name:
          type: string
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ContactChannel'
        note:
          type: string
        fields:
          type: object
          additionalProperties:
            type: string
      required:
      - workspace_id
      - channels
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        display_name:
          type:
          - string
          - 'null'
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ContactChannel'
        source:
          type: string
          enum:
          - inbox
          - radar
          - import
        note:
          type:
          - string
          - 'null'
        first_seen_at:
          type: string
          format: date-time
        last_seen_at:
          type: string
          format: date-time
        fields:
          type: object
          additionalProperties:
            type: string
          description: Custom field values, keyed by field key
        labels:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
        workspace_id:
          type: string
          format: uuid
          description: Only on a listing that spans workspaces
      required:
      - id
      - channels
      - source
      - first_seen_at
      - last_seen_at
      - fields
    ImportContactsResponse:
      type: object
      properties:
        created:
          type: integer
        merged:
          type: integer
          description: Rows that folded into a contact already on file
        skipped:
          type: array
          items:
            type: object
            properties:
              row:
                type: integer
              reason:
                type: string
            required:
            - row
            - reason
        unknown_columns:
          type: array
          items:
            type: string
          description: Columns that named neither a reserved field nor a custom field
      required:
      - created
      - merged
      - skipped
      - unknown_columns
    ContactChannel:
      type: object
      properties:
        platform:
          type: string
        handle:
          type: string
          description: Lower-cased, no leading @
        externalId:
          type:
          - string
          - 'null'
          description: The platform's own id for this person, when known
      required:
      - platform
      - handle
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable snake_case error code
        message:
          type: string
          description: Human-readable explanation; may change
      required:
      - error
      - message
      additionalProperties: true
      description: The one error envelope, on every endpoint including an unknown route (`not_found`) and a server fault (`internal_error`). Some errors carry additional context fields (for example `retry_after`, `upgrade_url`, `issues`). Every response also carries an `X-Request-Id` header to quote to support.
    UpdateContactRequest:
      type: object
      properties:
        display_name:
          type:
          - string
          - 'null'
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ContactChannel'
        note:
          type:
          - string
          - 'null'
        fields:
          type: object
          additionalProperties:
            type:
            - string
            - 'null'
          description: A null or empty value clears that field
    ImportContactsRequest:
      type: object
      properties:
        workspace_id:
          type: string
          format: uuid
        csv:
          type: string
          description: CSV text. `platform` and `handle` are required columns; `external_id`, `display_name` and `note` are optional, and any other column is read as a custom field key.
      required:
      - workspace_id
      - csv
    CreateCustomFieldRequest:
      type: object
      properties:
        key:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
          - text
          - number
          - date
          - select
          - boolean
        options:
          type: array
          items:
            type: string
      required:
      - key
      - name
    CustomField:
      type: object
      properties:
        id:
          type: string
          format: uuid
        key:
          type: string
          description: Lower-case key; also the CSV column header
        name:
          type: string
        type:
          type: string
          enum:
          - text
          - number
          - date
          - select
          - boolean
        options:
          type: array
          items:
            type: string
          description: Allowed values when `type` is select
        position:
          type: integer
      required:
      - id
      - key
      - name
      - type
      - options
      - position
    ContactListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        meta:
          $ref: '#/components/schemas/PageMeta'
      required:
      - data
      - meta
    PageMeta:
      type: object
      properties:
        page:
          type: integer
        per_page:
          type: integer
        total:
          type: integer
        total_pages:
          type: integer
          description: At least 1, so an empty list is one empty page
      required:
      - page
      - per_page
      - total
      - total_pages
    ContactConversation:
      type: object
      properties:
        key:
          type: string
          description: DM thread id, else the root post id, else the handle
        account_id:
          type: string
          format: uuid
        account_username:
          type:
          - string
          - 'null'
        platform:
          type: string
        messages:
          type: integer
        received:
          type: integer
        sent:
          type: integer
        last_message_at:
          type:
          - string
          - 'null'
          format: date-time
        last_item_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The newest inbox item in the thread
      required:
      - key
      - account_id
      - platform
      - messages
      - received
      - sent
    UpdateCustomFieldRequest:
      type: object
      properties:
        name:
          type: string
        options:
          type: array
          items:
            type: string
        position:
          type: integer
  headers:
    XRequestId:
      description: Unique id of this request; quote it to support
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key created in the FoPost dashboard. A key may be bound to a single workspace, in which case every request is confined to it: naming any other workspace returns 403, and listings return only that workspace. Keys created without a workspace keep access to every workspace on the account.'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Session token used by the FoPost dashboard
    OAuth2:
      type: oauth2
      description: For third-party apps acting on behalf of a FoPost user. Authorization code with PKCE (S256) is required. The token is confined to the workspace the user approved and to the scopes they granted.
      flows:
        authorizationCode:
          authorizationUrl: https://api.fopost.com/oauth/authorize
          tokenUrl: https://api.fopost.com/oauth/token
          refreshUrl: https://api.fopost.com/oauth/token
          scopes:
            posts: Read and write posts, media and content
            publish: Publish, retry and cancel a post
            accounts: Connected social accounts
            workspaces: List and manage workspaces
            labels: Labels used to organise posts
            webhooks: Webhook endpoints
            analytics: Metrics and insights
            automations: Automation rules and runs
            inbox: Comments, mentions and messages
            ads: Ads, audiences and lead forms across ad networks
            ai: AI features (spends credits)
            extension: Reserved for the browser extension