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

# Sample contacts

> Sample data for testing a trigger. Returns up to three of the workspace's most recent contacts, formatted exactly as the ContactCreated, ContactUpdated and ContactDeleted webhooks deliver them, so a subscriber can see the real payload before any event fires. If the workspace has no contacts yet, three generated placeholder records in the same shape are returned instead. This is not a history endpoint.



## OpenAPI

````yaml developer/api-reference/openapi.json GET /integrations/developer/zapier/get-contacts
openapi: 3.1.0
info:
  contact:
    email: support@messagedesk.com
    name: MessageDesk Support
    url: https://messagedesk.com
  description: >-
    The MessageDesk Developer API. Integration providers use it to read and
    write a workspace on a user's behalf. Zapier is the only supported provider
    today; endpoints are namespaced by provider under
    `/integrations/developer/{provider}`.
  title: MessageDesk API
  version: '1.0'
servers:
  - description: Production
    url: https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main
security: []
tags:
  - description: >-
      Read-only lookups an integration uses while a user configures it: the
      workspaces they belong to, and the users, phone numbers and contact
      properties in a workspace.
    name: Context lookups
  - description: >-
      Write operations an integration performs on behalf of a user. Every
      request body carries the target workspace as `id` and names the calling
      provider in `developerProvider`.
    name: Actions
  - description: >-
      Event subscriptions for instant triggers, plus sample-data endpoints that
      return a workspace's most recent records (or generated placeholders when
      it has none) in exactly the shape the matching webhook delivers.
    name: Triggers
externalDocs:
  description: ''
  url: ''
paths:
  /integrations/developer/zapier/get-contacts:
    get:
      tags:
        - Triggers
      summary: Sample contacts
      description: >-
        Sample data for testing a trigger. Returns up to three of the
        workspace's most recent contacts, formatted exactly as the
        ContactCreated, ContactUpdated and ContactDeleted webhooks deliver them,
        so a subscriber can see the real payload before any event fires. If the
        workspace has no contacts yet, three generated placeholder records in
        the same shape are returned instead. This is not a history endpoint.
      operationId: getContacts
      parameters:
        - description: Workspace ID
          in: query
          name: workspaceId
          required: true
          schema:
            type: string
        - description: Integration provider making the request
          in: query
          name: developerProvider
          required: true
          schema:
            enum:
              - zapier
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: >-
                    #/components/schemas/developer.DeveloperProviderContactWebhook
                type: array
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Missing or invalid bearer token
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: The authenticated user is not a member of the workspace
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Workspace or referenced record not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    developer.DeveloperProviderContactWebhook:
      properties:
        createdAt:
          description: The created at timestamp
          type: string
        email:
          description: The email of the contact
          type: string
        firstName:
          description: The first name of the contact
          type: string
        id:
          description: The ID of the contact
          type: string
        lastName:
          description: The last name of the contact
          type: string
        phone:
          description: The phone number of the contact
          type: string
        properties:
          additionalProperties: {}
          description: The properties of the contact
          type: object
        workspaceId:
          description: The workspace ID
          type: string
      required:
        - createdAt
        - email
        - firstName
        - id
        - lastName
        - phone
        - properties
        - workspaceId
      type: object
    openapi.ErrorResponse:
      properties:
        error:
          description: Human-readable description of the failure
          example: workspace not found
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: >-
        An OAuth 2.0 access token, sent as `Authorization: Bearer <token>`.
        MessageDesk is the OAuth 2.0 provider (backed by AWS Cognito): an
        integration such as Zapier obtains the token through the
        authorization-code flow when a user connects their MessageDesk account.
        Access tokens are valid for 24 hours and are refreshed with the refresh
        token.
      scheme: bearer
      type: http

````