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

# Setup contact card

> Activate the authenticated agent's Contact Card.



## OpenAPI

````yaml /api-reference/openapi.mint.yaml post /v1/contact_card
openapi: 3.1.0
info:
  title: Relay API
  version: 1.0.0
  description: >-
    Create conversations between users and agents.


    Send multipart Messages, manage Chats, upload Attachments, and receive agent
    events.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.relayapp.im
    description: Relay API
security:
  - BearerAuth: []
tags:
  - name: Chats
    x-page-title: Chats
    description: Create, retrieve, and update direct or group chats.
  - name: Messages
    x-page-title: Messages
    description: Send and retrieve messages, replies, reactions, and receipts.
  - name: Attachments
    x-page-title: Attachments
    description: Allocate, upload, retrieve, and delete attachment bytes.
  - name: Blocked Handles
    x-page-title: Blocked Handles
    description: Block or unblock registered Relay Handles.
  - name: Contact Card
    x-page-title: Contact Card
    description: Manage the authenticated agent's Relay contact card.
  - name: Webhooks
    x-page-title: Webhooks
    description: Register signed webhook destinations.
  - name: WebSocket
    description: Receive agent events over a durable acknowledged WebSocket.
paths:
  /v1/contact_card:
    post:
      tags:
        - Contact Card
      summary: Setup contact card
      description: Activate the authenticated agent's Contact Card.
      operationId: setupContactCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetContactCardRequest'
      responses:
        '200':
          description: Contact card created/updated and sync attempted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetContactCardResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    SetContactCardRequest:
      type: object
      required:
        - handle
        - first_name
      properties:
        first_name:
          type: string
          description: First name for the contact card. Required.
        last_name:
          type: string
          description: Last name for the contact card. Optional.
        image_url:
          type: string
          description: Profile image URL for the contact card.
        handle:
          type: string
          description: Relay Handle associated with this contact card.
    SetContactCardResponse:
      type: object
      required:
        - handle
        - first_name
        - is_active
        - kind
        - last_name
        - image_url
      properties:
        first_name:
          type: string
          description: First name on the contact card
        last_name:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
          format: uri
        is_active:
          type: boolean
          description: Whether the contact card was successfully applied to the device
        handle:
          type: string
          description: Relay Handle associated with this contact card.
        kind:
          type: string
          enum:
            - user
            - agent
          description: Whether the Contact is a user or an agent.
    ErrorResponse:
      type: object
      required:
        - error
        - success
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        success:
          type: boolean
          description: Always false for error responses
        trace_id:
          type: string
          description: Unique trace ID for request tracing and debugging
    ErrorDetail:
      type: object
      required:
        - status
        - code
        - message
        - doc_url
      properties:
        status:
          type: integer
          description: HTTP status code (e.g., 400, 404, 500)
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Human-readable error message
        doc_url:
          type: string
          description: Link to documentation for this error code
        retry_after:
          type: integer
          description: >-
            Number of seconds to wait before retrying. Only present on 429 rate
            limit errors.
    ErrorCode:
      type: integer
      description: Relay API error code.
  responses:
    BadRequest:
      description: Invalid request - validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden - no access to this resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: The request conflicts with the current state of the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer token authentication. Include your API token in the Authorization
        header.


        Format: `Authorization: Bearer <your-token>`

````