Sending Contacts API

Contacts and per-channel identities.

GitHub OpenAPI

Operations 9

GET /contacts List contacts #
POST /contacts Create or update a contact #
GET /contacts/{id} Get a contact #
DELETE /contacts/{id} Delete a contact #
GET /contacts/{id}/commerce Contact purchases #
GET /contacts/{id}/conversions Contact conversion detail #
GET /contacts/{id}/journey Full contact timeline #
POST /contacts/{id}/tags Assign a tag to a contact #
DELETE /contacts/{id}/tags Remove a tag from a contact #

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/sending-dev:sending-dev-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

sending-dev-contacts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sending.dev Contacts API
  version: 1.0.0
  description: 'Public REST API of Sending.dev (MCP-native orchestrator for email + WhatsApp + Telegram).


    ## Authentication

    Every request requires `Authorization: Bearer sk_...` (workspace API key). The `tenantId` is always derived from the key.


    ## Idempotency

    Sends require an `idempotencyKey` (min 8 characters) to prevent duplicates on retries.'
  contact:
    name: Sending.dev
    url: https://sending.dev
servers:
- url: https://sending.dev/api/v1
  description: Production
- url: http://localhost:3000/api/v1
  description: Local development
security:
- bearerAuth: []
tags:
- name: Contacts
  description: Contacts and per-channel identities.
paths:
  /contacts:
    get:
      tags:
      - Contacts
      summary: List contacts
      description: 'Paginated list with search and filters. Required scope: `contacts:read` or `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:read
      - contacts:write
      parameters:
      - schema:
          type: string
        required: false
        name: q
        in: query
      - schema:
          type: string
          format: uuid
        required: false
        name: tagId
        in: query
      - schema:
          type: string
          format: uuid
        required: false
        name: listId
        in: query
      - schema:
          type: string
          enum:
          - subscribed
          - unsubscribed
          - unknown
        required: false
        name: status
        in: query
      - schema:
          type: integer
          minimum: 1
          default: 1
        required: false
        name: page
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
        required: false
        name: pageSize
        in: query
      responses:
        '200':
          description: Page of contacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactList'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '422':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      operationId: getContacts
      x-operation-id-source: derived
    post:
      tags:
      - Contacts
      summary: Create or update a contact
      description: 'Creates the contact with its per-channel identities, or attaches to the one that already has one of those identities (the per-channel address is the natural key). Idempotent: repeating the same request answers 200 with `created: false` instead of failing. `attributes` are merged with the existing ones (`null` on a key deletes it) and `consent` is touched only if declared. 409 if the request''s identities belong to different contacts: merging two contacts is irreversible and is not done automatically. On a NEW email identity, `warnings` flags a suspicious domain typo or an address already undeliverable on SES (suppressed immediately for this tenant): absent, never an empty array, when there is nothing to say. Required scope: `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContact'
      responses:
        '200':
          description: Contact already existed, updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactUpserted'
        '201':
          description: Contact created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactUpserted'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Plan quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaError'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '409':
          description: State conflict (e.g. duplicate).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      operationId: postContacts
      x-operation-id-source: derived
  /contacts/{id}:
    get:
      tags:
      - Contacts
      summary: Get a contact
      description: 'Contact with channel identities, tags and lists. Required scope: `contacts:read` or `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:read
      - contacts:write
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactDetail'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getContactsById
      x-operation-id-source: derived
    delete:
      tags:
      - Contacts
      summary: Delete a contact
      description: 'Deletes the contact: identities, tags, list memberships and automation enrollments are removed in cascade. Messages already sent remain (without the link to the contact) because they are delivery history and the basis of the monthly usage, and suppressions stay active. Required scope: `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:write
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Contact deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: deleteContactsById
      x-operation-id-source: derived
  /contacts/{id}/commerce:
    get:
      tags:
      - Contacts
      summary: Contact purchases
      description: 'Orders count, spent (per currency, never summed across currencies), average order value, first and last order, and the last 10 orders of the contact, from connected stores and the commerce API. Required scope: `commerce:read`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - commerce:read
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Contact purchases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactCommerce'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getContactsByIdCommerce
      x-operation-id-source: derived
  /contacts/{id}/conversions:
    get:
      tags:
      - Contacts
      summary: Contact conversion detail
      description: 'Contact conversions with value, time to conversion (first touch → conversion), touchpoints in the lookback window and attributed UTMs. Required scope: `utm:read`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - utm:read
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Contact conversions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactConversionList'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getContactsByIdConversions
      x-operation-id-source: derived
  /contacts/{id}/journey:
    get:
      tags:
      - Contacts
      summary: Full contact timeline
      description: 'Sent messages (split into transactional/campaign/automation), emails written by the contact to agent inboxes, UTM touches and conversions, newest first. Required scope: `contacts:read` or `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:read
      - contacts:write
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Contact timeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactJourney'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getContactsByIdJourney
      x-operation-id-source: derived
  /contacts/{id}/tags:
    post:
      tags:
      - Contacts
      summary: Assign a tag to a contact
      description: 'Required scope: `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:write
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagBody'
      responses:
        '201':
          description: Tag assigned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      operationId: postContactsByIdTags
      x-operation-id-source: derived
    delete:
      tags:
      - Contacts
      summary: Remove a tag from a contact
      description: 'Required scope: `contacts:write`.'
      security:
      - bearerAuth: []
      x-required-scope:
      - contacts:write
      parameters:
      - schema:
          type: string
          description: Contact ID.
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagBody'
      responses:
        '200':
          description: Tag removed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
        '401':
          description: Missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      operationId: deleteContactsByIdTags
      x-operation-id-source: derived
components:
  schemas:
    CreateContact:
      type: object
      properties:
        attributes:
          type: object
          additionalProperties: {}
          default: {}
        identities:
          type: array
          items:
            type: object
            properties:
              channel:
                type: string
                enum:
                - email
                - whatsapp
                - telegram
              address:
                type: string
                minLength: 1
              consent:
                type: string
                enum:
                - unknown
                - opted_in
                - opted_out
                - not_subscribed
            required:
            - channel
            - address
          default: []
    ContactCommerce:
      type: object
      properties:
        contactId:
          type: string
          format: uuid
        ordersCount:
          type: integer
          description: Orders, cancelled excluded, all currencies.
        totalSpent:
          type:
          - number
          - 'null'
          description: Gross spent; `null` with more than one currency (never summed).
        currency:
          type:
          - string
          - 'null'
        averageOrderValue:
          type:
          - number
          - 'null'
        byCurrency:
          type: array
          items:
            type: object
            properties:
              currency:
                type: string
              revenue:
                type: number
              refunded:
                type: number
              orders:
                type: integer
              averageOrderValue:
                type:
                - number
                - 'null'
            required:
            - currency
            - revenue
            - refunded
            - orders
            - averageOrderValue
          description: 'One row per currency, highest revenue first: the numbers to read when there is more than one.'
        firstOrderAt:
          type:
          - string
          - 'null'
          format: date-time
        lastOrderAt:
          type:
          - string
          - 'null'
          format: date-time
        recentOrders:
          type: array
          items:
            $ref: '#/components/schemas/CommerceOrder'
          description: Last 10 orders, cancelled included.
      required:
      - contactId
      - ordersCount
      - totalSpent
      - currency
      - averageOrderValue
      - byCurrency
      - firstOrderAt
      - lastOrderAt
      - recentOrders
    ContactList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        total:
          type: integer
        page:
          type: integer
        pageSize:
          type: integer
      required:
      - data
      - total
      - page
      - pageSize
    CommerceOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source:
          type: string
          enum:
          - store
          - api
          description: '`store`: a connected store; `api`: `POST /commerce/orders`.'
        connectionId:
          type:
          - string
          - 'null'
          format: uuid
        externalId:
          type: string
        contactId:
          type:
          - string
          - 'null'
          format: uuid
        status:
          type: string
          enum:
          - placed
          - fulfilled
          - cancelled
          description: 'API orders are always `placed`: the API knows no fulfillment or cancellation.'
        total:
          type: number
        refunded:
          type: number
        currency:
          type: string
        placedAt:
          type: string
          format: date-time
        attributedMessageId:
          type:
          - string
          - 'null'
          description: Marketing message with the last content click in the attribution window before the order; `null` if none.
        attributedTo:
          type:
          - object
          - 'null'
          properties:
            campaignId:
              type:
              - string
              - 'null'
              format: uuid
            automationId:
              type:
              - string
              - 'null'
              format: uuid
          required:
          - campaignId
          - automationId
        items:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              quantity:
                type: number
              price:
                type:
                - number
                - 'null'
              productId:
                type:
                - string
                - 'null'
            required:
            - title
            - quantity
            - price
            - productId
      required:
      - id
      - source
      - connectionId
      - externalId
      - contactId
      - status
      - total
      - refunded
      - currency
      - placedAt
      - attributedMessageId
      - attributedTo
      - items
    TagBody:
      type: object
      properties:
        tagId:
          type: string
          format: uuid
      required:
      - tagId
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          enum:
          - forbidden
        need:
          type: string
          example: contacts:write
      required:
      - error
      description: Insufficient scope; `need` names the missing scope.
    Ok:
      type: object
      properties:
        ok:
          type: boolean
          enum:
          - true
      required:
      - ok
    ContactIdentity:
      type: object
      properties:
        channel:
          type: string
          example: email
        address:
          type: string
        consent:
          type: string
          example: opted_in
        verified:
          type: boolean
        isPrimary:
          type: boolean
      required:
      - channel
      - address
      - consent
    ContactJourney:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ContactJourneyEntry'
      required:
      - data
    ValidationError:
      type: object
      properties:
        error:
          type: object
          properties:
            formErrors:
              type: array
              items:
                type: string
            fieldErrors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
          required:
          - formErrors
          - fieldErrors
      required:
      - error
      description: 'Zod validation failed: shape of `ZodError.flatten()`.'
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        attributes:
          type: object
          additionalProperties: {}
        createdAt:
          type: string
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
      required:
      - id
    QuotaError:
      type: object
      properties:
        error:
          type: string
          example: quota_exceeded
        message:
          type: string
        resource:
          type: string
        limit:
          type: number
        used:
          type: number
        remaining:
          type: number
        plan:
          type: string
      required:
      - error
      description: Plan limit exceeded (entitlement).
    ContactConversionList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ContactConversion'
        totals:
          type: object
          properties:
            conversions:
              type: integer
            revenueCents:
              type: integer
          required:
          - conversions
          - revenueCents
        lookbackDays:
          type: integer
      required:
      - data
      - totals
    ContactJourneyMessageEvents:
      type: object
      properties:
        openedHuman:
          type: integer
        openedMachine:
          type: integer
          description: Non-human opens (Apple MPP, Gmail proxy, scanners).
        clicks:
          type: integer
        contentClicks:
          type: integer
          description: 'Clicks on content: excludes logo, domain chrome and social links.'
        links:
          type: array
          items:
            type: string
          description: Clicked URLs, canonical (without utm_*) and deduplicated.
        lastLinkUrl:
          type:
          - string
          - 'null'
        bounced:
          type: boolean
        unsubscribed:
          type: boolean
      required:
      - openedHuman
      - openedMachine
      - clicks
      - contentClicks
      - links
      - lastLinkUrl
      - bounced
      - unsubscribed
    Error:
      type: object
      properties:
        error:
          type: string
          example: not_found
        message:
          type: string
      required:
      - error
      description: 'Generic error: snake_case code in `error`.'
    ContactJourneyEntry:
      type: object
      properties:
        type:
          type: string
          enum:
          - message_sent
          - email_received
          - touch
          - conversion
          - note
          - enrollment
          description: Timeline entry type.
        at:
          type: string
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
        kind:
          type: string
          description: 'Origin of messages and touches: transactional | campaign | automation | event | posthog.'
        subject:
          type:
          - string
          - 'null'
        to:
          type: object
          properties:
            address:
              type: string
            displayName:
              type: string
            domainKind:
              type: string
          required:
          - address
          - displayName
          - domainKind
          description: Destination agent inbox (email_received only).
        name:
          type: string
        valueCents:
          type: integer
        events:
          allOf:
          - $ref: '#/components/schemas/ContactJourneyMessageEvents'
          - description: Summary of the message's events (message_sent via email only).
        phase:
          type: string
          enum:
          - entered
          - exited
          - current
          description: 'Enrollment only: entry into the automation, exit, or the node the contact is currently on.'
        automationId:
          type: string
          format: uuid
        automationName:
          type: string
        status:
          type: string
        nodeId:
          type:
          - string
          - 'null'
        nodeLabel:
          type:
          - string
          - 'null'
          description: Email subject for message steps, otherwise the action name.
        nodeType:
          type:
          - string
          - 'null'
        exitReason:
          type:
          - string
          - 'null'
        test:
          type: boolean
      required:
      - type
      - at
    ContactUpserted:
      type: object
      properties:
        id:
          type: string
          format: uuid
        created:
          type: boolean
        identitiesAdded:
          type: integer
        warnings:
          type: array
          items:
            type: string
      required:
      - id
      - created
      - identitiesAdded
    ContactDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        attributes:
          type: object
          additionalProperties: {}
        createdAt:
          type: string
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
        identities:
          type: array
          items:
            $ref: '#/components/schemas/ContactIdentity'
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
            required:
            - id
            - name
        lists:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
            required:
            - id
            - name
      required:
      - id
      - identities
      - tags
      - lists
    ContactConversion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        source:
          type: string
        valueCents:
          type: integer
        currency:
          type: string
        occurredAt:
          type: string
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
        firstTouchAt:
          type:
          - string
          - 'null'
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
        lastTouchAt:
          type:
          - string
          - 'null'
          format: date-time
          example: '2026-06-30T12:00:00.000Z'
        timeToConvertSeconds:
          type:
          - integer
          - 'null'
          description: Seconds from first touch to conversion.
        touchpoints:
          type: integer
          description: Touches in the lookback window before the conversion.
        utmSource:
          type:
          - string
          - 'null'
        utmMedium:
          type:
          - string
          - 'null'
        utmCampaign:
          type:
          - string
          - 'null'
        attributedKind:
          type:
          - string
          - 'null'
          enum:
          - campaign
          - automation
          - transactional
          - event
          - posthog
          description: 'Type of the attributed touch: campaign/automation (marketing) vs transactional.'
      required:
      - id
      - name
      - source
      - valueCents
      - currency
      - occurredAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Workspace API key in the `sk_...` format, passed as `Authorization: Bearer sk_...`. The `tenantId` is always derived from the key, never from a request parameter.'