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

# Get a contact

> The contact with every consent record, newest first, revoked ones included. Requires `read`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/contacts/{id}
openapi: 3.1.0
info:
  title: Sendbaze API
  version: '1.0'
  description: >
    Transactional email and SMS for Africa. Send from your own domain through
    Amazon SES in Cape Town.

    Every send returns an id immediately; delivery is reported by webhook and in
    the dashboard logs.
  contact:
    name: Sendbaze support
    email: support@sendbaze.com
    url: https://www.sendbaze.com
servers:
  - url: https://api.sendbaze.com
security:
  - bearerAuth: []
tags:
  - name: Emails
  - name: Templates
  - name: Domains
  - name: Suppressions
  - name: Webhooks
  - name: SMS
  - name: Contacts
  - name: Senders
  - name: Usage
paths:
  /v1/contacts/{id}:
    get:
      tags:
        - Contacts
      summary: Get a contact
      description: >-
        The contact with every consent record, newest first, revoked ones
        included. Requires `read`.
      operationId: getContact
      parameters:
        - $ref: '#/components/parameters/ContactId'
      responses:
        '200':
          description: The contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ContactId:
      name: id
      in: path
      required: true
      schema:
        type: string
        example: ct_01j9x7k2r4m8q3v5n6b7c8d9e0
  schemas:
    Contact:
      allOf:
        - $ref: '#/components/schemas/ContactSummary'
        - type: object
          required:
            - consents
          properties:
            consents:
              type: array
              description: Every consent record, newest first, revoked ones included.
              items:
                $ref: '#/components/schemas/Consent'
    ContactSummary:
      type: object
      required:
        - id
        - email
        - phone
        - attributes
        - marketing
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          example: ct_01j9x7k2r4m8q3v5n6b7c8d9e0
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        attributes:
          $ref: '#/components/schemas/ContactAttributes'
        marketing:
          type: object
          required:
            - email
            - sms
          properties:
            email:
              $ref: '#/components/schemas/MarketingStatus'
            sms:
              $ref: '#/components/schemas/MarketingStatus'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Consent:
      type: object
      required:
        - id
        - contactId
        - channel
        - value
        - purpose
        - source
        - evidence
        - capturedAt
        - recordedAt
        - revokedAt
        - revokedReason
      properties:
        id:
          type: string
          example: cns_01j9x7k2r4m8q3v5n6b7c8d9e0
        contactId:
          type:
            - string
            - 'null'
          description: Null once the contact was deleted; `value` stays as the evidence.
        channel:
          $ref: '#/components/schemas/ConsentChannel'
        value:
          type: string
          description: The address or number consent was given for
          as it was when recorded.: null
        purpose:
          type: string
          example: marketing
        source:
          $ref: '#/components/schemas/ConsentSource'
        evidence:
          type:
            - object
            - 'null'
          additionalProperties: true
        capturedAt:
          type: string
          format: date-time
          description: When the person consented.
        recordedAt:
          type: string
          format: date-time
          description: When Sendbaze stored it.
        revokedAt:
          type:
            - string
            - 'null'
          format: date-time
        revokedReason:
          type:
            - string
            - 'null'
          description: stop_reply
          unsubscribe: null
          manual or api.: null
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
    ContactAttributes:
      type: object
      description: >-
        Your own flat fields, up to 40 keys of lower-case letters, digits and
        underscores; values up to 500 characters. `first_name` fills
        `{{first_name}}` in sends.
      additionalProperties:
        type: string
        maxLength: 500
      example:
        first_name: Thandi
        city: Pretoria
    MarketingStatus:
      type: object
      required:
        - consented
        - optedOutAt
      properties:
        consented:
          type: boolean
          description: An unrevoked marketing consent exists on this channel.
        optedOutAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Set when the person opted out (STOP
          unsubscribe link: null
          or by hand); marketing is refused.: null
    ConsentChannel:
      type: string
      enum:
        - email
        - sms
    ConsentSource:
      type: string
      enum:
        - form
        - import
        - existing_customer
        - manual
        - attestation
      description: >
        How the person agreed. form: a form they submitted. import: a list you
        brought with consent already

        obtained. existing_customer: they bought from you and could opt out
        (POPIA s69(3)). manual: a teammate

        typed it in. attestation: written by the dashboard when a teammate
        confirms a list's consent on the Send page.
    ErrorBody:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable error code; see the errors reference.
          example: validation_error
        message:
          type: string
        docs:
          type: string
          format: uri
        fields:
          type: object
          description: Present on validation errors. Dotted path to messages.
          additionalProperties:
            type: array
            items:
              type: string
        limit:
          type: integer
          description: On `plan_limit`, the ceiling that was reached.
        upgradeUrl:
          type: string
          format: uri
          description: >-
            Where to change plan, when a bigger plan would have allowed the
            request.
        topUpUrl:
          type: string
          format: uri
          description: >-
            Where to add wallet funds, when a balance would have allowed the
            request.
        settingsUrl:
          type: string
          format: uri
          description: >-
            Where to change an organisation setting that blocked the request
            (SMS destinations).
        domainsUrl:
          type: string
          format: uri
          description: >-
            Where to add and verify a sending domain, on
            `sandbox_recipient_not_allowed` and `sandbox_limit_reached`.
  responses:
    NotFound:
      description: No such resource in your organisation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: No email with id em_x.
              docs: https://docs.sendbaze.com/errors#not_found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from the dashboard. `sk_live_…` sends; `sk_test_…` validates
        and returns ids without sending.

````

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