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

# Enrich people

> Request an asynchronous enrichment of emails and/or phones for up to 500 people.

Request an enrichment of emails and/or phones for up to 500 people. folk searches the requested fields with external data providers, and saves the data found on each person. To learn more, read the [Person enrichments](/core-concepts/person-enrichments) guide.

### Asynchronous processing

The enrichment runs asynchronously: the request returns a [`202` response](/api-reference/success-responses#accepted) with the enrichment in the `pending` status, before any person is enriched. If no ID matches a person you can enrich, the enrichment is already `completed` in the response, with every item `skipped`.

To know when the enrichment is over, either:

* Poll the [Get an enrichment of people](/api-reference/person-enrichments/get-an-enrichment-of-people) endpoint with the returned `id` until the status of the enrichment is `completed` or `failed`.
* Subscribe a [webhook](/webhooks/events-and-payloads#person-enrichment-events) to the `person_enrichment.finished` event, then get the enrichment from the `url` of the event.

Once completed, the enrichment contains the result for each person in `items`, and the counts per result in `summary`.

You can also find the enrichment later with [List enrichments of people](/api-reference/person-enrichments/list-enrichments-of-people).

### Credits

Enrichments consume the enrichment credits of the workspace. Read [how credits are consumed](https://help.folk.app/en/articles/6804416-1-click-enrichment-find-emails-phone-numbers) to learn more.

* Check the credits left in the workspace with [Get credits](/api-reference/credits/get-credits).
* The request is rejected with a [`402` error](/api-reference/errors#payment-required) if the workspace doesn't have enough credits for the maximum possible cost of the enrichment. Nothing is performed or charged: send a smaller request, or add credits to the workspace.

### People to enrich

Enriching a person needs the contributor role or above in at least one of its groups.

* Duplicate IDs are enriched once.
* IDs of people already merged into another one are resolved to the resulting person.
* IDs that don't match a person you can enrich (unknown, deleted, not accessible to you, or you aren't a contributor in any of the person's groups) don't reject the request: they are reported with the `skipped` status in the result of the enrichment.
* People deleted or merged after the request, including while being enriched, no longer appear in the result of the enrichment, nor in its `summary`.

<Info>
  The more a person has data, the better the results. Names, a company, a
  company website and a LinkedIn URL help the providers find the requested
  fields. For people that aren't fully enriched, `missingInputs` lists the data
  that was missing: read [Improving the
  results](/core-concepts/person-enrichments#improving-the-results) to learn more.
</Info>


## OpenAPI

````yaml post /v1/person-enrichments
openapi: 3.1.0
info:
  title: Folk External API
  description: >-
    Folk's public REST API lets you manage workspaces, groups, contacts, and
    real-time triggers.
  version: '2025-06-09'
  contact:
    name: folk
    email: tech@folk.app
    url: https://folk.app
servers:
  - url: https://api.folk.app
    description: Folk's public API production base URL.
    x-internal: false
security: []
tags:
  - name: Companies
    description: Operations related to companies.
  - name: Credits
    description: Operations related to credits.
  - name: Deals
    description: Operations related to deals.
  - name: Groups
    description: Operations related to groups.
  - name: Group members
    description: Operations related to group members.
  - name: Group custom fields
    description: Operations related to group custom fields.
  - name: Interactions
    description: Operations related to interactions.
  - name: Notes
    description: Operations related to notes.
  - name: People
    description: Operations related to people.
  - name: Person enrichments
    description: Operations related to person enrichments.
  - name: Reminders
    description: Operations related to reminders.
  - name: Tasks
    description: Operations related to tasks.
  - name: Users
    description: Operations related to users.
  - name: Webhooks
    description: Operations related to webhooks.
paths:
  /v1/person-enrichments:
    post:
      tags:
        - Person enrichments
      summary: Enrich people
      description: >-
        Request an asynchronous enrichment of emails and/or phones for up to 500
        people.
      operationId: createPersonEnrichment
      parameters:
        - schema:
            type: string
            maxLength: 255
            description: >-
              A unique key, such as a UUID, that makes retrying this request
              safe: a retry with the same key and body returns the original
              response without running the operation again. Keys are kept for 24
              hours after the request completes.
            example: 8e03978e-40d5-43e8-bc93-6894a57f9324
          required: false
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: array
                  items:
                    type: string
                    enum:
                      - emails
                      - phones
                    description: 'A person field to enrich. One of: emails, phones.'
                    example: emails
                  minItems: 1
                  maxItems: 2
                  description: >-
                    The fields to enrich on each person. Each field can only be
                    requested once.
                  example:
                    - emails
                    - phones
                ids:
                  type: array
                  items:
                    type: string
                    minLength: 40
                    maxLength: 40
                  minItems: 1
                  maxItems: 500
                  description: >-
                    The IDs of the people to enrich, up to 500. Duplicate IDs
                    are enriched once. IDs that don't match a person you can
                    enrich don't reject the request: they are reported as items
                    with the `skipped` status.
                  example:
                    - per_05834d3b-2c1a-4e5f-8a9b-0c1d2e3f4a5b
                    - per_9a1c7e2f-3b4d-4c5e-9f6a-7b8c9d0e1f2a
                    - per_77be1a2b-4c5d-4e6f-8a7b-9c0d1e2f3a4b
              required:
                - fields
                - ids
              additionalProperties: false
              example:
                fields:
                  - emails
                  - phones
                ids:
                  - per_05834d3b-2c1a-4e5f-8a9b-0c1d2e3f4a5b
                  - per_9a1c7e2f-3b4d-4c5e-9f6a-7b8c9d0e1f2a
                  - per_77be1a2b-4c5d-4e6f-8a7b-9c0d1e2f3a4b
      responses:
        '202':
          description: The enrichment that has been requested.
          links:
            getPersonEnrichment:
              operationId: getPersonEnrichment
              parameters:
                enrichmentId: $response.body#/data/id
              description: >-
                This enrichment id can be used as an input to the `GET
                /v1/person-enrichments/:enrichmentId` operation to follow the
                enrichment.
            listPersonEnrichments:
              operationId: listPersonEnrichments
              description: >-
                The `GET /v1/person-enrichments` operation lists the person
                enrichments of the workspace, to find this enrichment among the
                others without its id.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-RateLimit-Limit-Burst:
              $ref: '#/components/headers/X-RateLimit-Limit-Burst'
            X-RateLimit-Remaining-Burst:
              $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
            X-RateLimit-Reset-Burst:
              $ref: '#/components/headers/X-RateLimit-Reset-Burst'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The ID of the enrichment.
                        example: enr_3f2a6c1e-8b1d-4f0a-9c2e-5d7b8a9e0f11
                      status:
                        type: string
                        enum:
                          - pending
                          - in_progress
                          - completed
                          - failed
                        description: >-
                          The status of the enrichment. `pending`: not started
                          yet. `in_progress`: running. `completed`: over, see
                          `summary` and `items`. `failed`: the enrichment
                          couldn't run, see `errorReason`. New values may be
                          added in the future: handle unknown values gracefully.
                        example: completed
                      fields:
                        type: array
                        items:
                          type: string
                          enum:
                            - emails
                            - phones
                          description: 'A person field to enrich. One of: emails, phones.'
                          example: emails
                        description: >-
                          The requested fields. New values may be added in the
                          future: handle unknown values gracefully.
                        example:
                          - emails
                          - phones
                      createdAt:
                        type: string
                        format: date-time
                        description: When the enrichment was requested.
                        example: '2026-09-23T13:02:36.209Z'
                      finishedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          When the enrichment completed or failed, or null while
                          it is pending or in progress.
                        example: '2026-09-23T13:03:25.203Z'
                      errorReason:
                        type:
                          - string
                          - 'null'
                        enum:
                          - insufficient_credits
                          - internal_error
                          - null
                        description: >-
                          Why the enrichment failed, or null if it didn't.
                          `insufficient_credits`: the workspace ran out of
                          enrichment credits before the enrichment started.
                          `internal_error`: a technical failure. New values may
                          be added in the future: handle unknown values
                          gracefully.
                      summary:
                        type:
                          - object
                          - 'null'
                        properties:
                          total:
                            type: integer
                            minimum: 0
                            description: >-
                              The number of distinct people in the enrichment
                              that you can access.
                            example: 3
                          enriched:
                            type: integer
                            minimum: 0
                            description: The number of people with the `enriched` status.
                            example: 1
                          partiallyEnriched:
                            type: integer
                            minimum: 0
                            description: >-
                              The number of people with the `partially_enriched`
                              status.
                            example: 1
                          notEnriched:
                            type: integer
                            minimum: 0
                            description: >-
                              The number of people with the `not_enriched`
                              status.
                            example: 1
                          skipped:
                            type: integer
                            minimum: 0
                            description: The number of people with the `skipped` status.
                            example: 1
                          error:
                            type: integer
                            minimum: 0
                            description: The number of people with the `error` status.
                            example: 1
                        required:
                          - total
                          - enriched
                          - partiallyEnriched
                          - notEnriched
                          - skipped
                          - error
                        description: >-
                          Counts of people per result status, among the people
                          you can access. Null until the enrichment is
                          completed.
                      items:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The ID of the person. If a requested ID belonged
                                to a person already merged into another one,
                                this is the ID of the resulting person. For the
                                `skipped` status, this is the ID as sent.
                              example: per_05834d3b-2c1a-4e5f-8a9b-0c1d2e3f4a5b
                            status:
                              type: string
                              enum:
                                - enriched
                                - partially_enriched
                                - not_enriched
                                - skipped
                                - error
                              description: >-
                                The enrichment result for this person.
                                `enriched`: new data was found for every
                                requested field. `partially_enriched`: new data
                                was found for some requested fields, see
                                `enrichedFields`. `not_enriched`: the person was
                                searched, and no new data was found for the
                                requested fields. A value the person already had
                                doesn't count. `skipped`: the ID doesn't match a
                                person you can enrich (unknown, deleted, not
                                accessible to you, or you aren't a contributor
                                in any of the person's groups), so the person
                                wasn't searched. `error`: no enrichment provider
                                could process this person, for instance because
                                the providers were unavailable, so the person
                                wasn't searched. Request a new enrichment for
                                this person later. New values may be added in
                                the future: handle unknown values gracefully.
                              example: enriched
                            enrichedFields:
                              type: array
                              items:
                                type: string
                                enum:
                                  - emails
                                  - phones
                                description: >-
                                  A person field to enrich. One of: emails,
                                  phones.
                                example: emails
                              description: >-
                                The requested fields for which an enrichment
                                provider found data during this enrichment.
                                Empty unless the status is `enriched` or
                                `partially_enriched`. New values may be added in
                                the future: handle unknown values gracefully.
                              example:
                                - emails
                                - phones
                            missingInputs:
                              type: array
                              items:
                                type: string
                                enum:
                                  - name
                                  - company
                                  - companyWebsite
                                  - linkedinUrl
                              description: >-
                                The person data the enrichment providers search
                                with, that the person didn't have when searched.
                                Adding it to the person may improve the results
                                of a new enrichment, with no guarantee. `name`:
                                a first or last name. `company`: a company
                                linked to the person. `companyWebsite`: a
                                website on the primary company of the person.
                                `linkedinUrl`: a LinkedIn profile URL
                                (`https://www.linkedin.com/in/...`) in the URLs
                                of the person. Empty unless the status is
                                `not_enriched` or `partially_enriched`. New
                                values may be added in the future: handle
                                unknown values gracefully.
                              example:
                                - companyWebsite
                                - linkedinUrl
                          required:
                            - id
                            - status
                            - enrichedFields
                            - missingInputs
                        maxItems: 500
                        description: >-
                          The result for each person you can access, all in this
                          response (not paginated). Null until the enrichment is
                          completed.
                    required:
                      - id
                      - status
                      - fields
                      - createdAt
                      - finishedAt
                      - errorReason
                      - summary
                      - items
                    description: >-
                      An enrichment of emails and/or phones for a list of
                      people, run asynchronously.
                    example:
                      id: enr_3f2a6c1e-8b1d-4f0a-9c2e-5d7b8a9e0f11
                      status: pending
                      fields:
                        - emails
                        - phones
                      createdAt: '2026-09-23T13:02:36.209Z'
                      finishedAt: null
                      errorReason: null
                      summary: null
                      items: null
                  deprecations:
                    type: array
                    items:
                      type: string
                    example:
                      - This field is deprecated
                required:
                  - data
              example:
                data:
                  id: enr_3f2a6c1e-8b1d-4f0a-9c2e-5d7b8a9e0f11
                  status: pending
                  fields:
                    - emails
                    - phones
                  createdAt: '2026-09-23T13:02:36.209Z'
                  finishedAt: null
                  errorReason: null
                  summary: null
                  items: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerApiKeyAuth: []
components:
  headers:
    X-RateLimit-Limit:
      schema:
        type: integer
        example: 1000
      description: >-
        The maximum number of requests that you can make in the current rate
        limit window.
    X-RateLimit-Remaining:
      schema:
        type: integer
        example: 998
      description: The number of requests remaining in the current rate limit window.
    X-RateLimit-Reset:
      schema:
        type: integer
        example: 1747322958
      description: >-
        The time at which the current rate limit window resets, in UTC epoch
        seconds.
    X-RateLimit-Limit-Burst:
      schema:
        type: integer
        example: 20
      description: >-
        The maximum number of requests that you can make in the current burst
        rate limit window.
    X-RateLimit-Remaining-Burst:
      schema:
        type: integer
        example: 18
      description: The number of requests remaining in the current burst rate limit window.
    X-RateLimit-Reset-Burst:
      schema:
        type: integer
        example: 1747322902
      description: >-
        The time at which the current burst rate limit window resets, in UTC
        epoch seconds.
    RateLimit-Policy:
      schema:
        type: string
        example: '"default";q=600;w=60, "burst";q=20;w=2'
      description: >-
        The rate limit policies applied to the request, as defined by the IETF
        RateLimit header fields draft. `q` is the number of requests allowed per
        window and `w` the window length in seconds.
    RateLimit:
      schema:
        type: string
        example: '"default";r=598;t=42, "burst";r=18;t=1'
      description: >-
        The current usage of each rate limit policy, as defined by the IETF
        RateLimit header fields draft. `r` is the number of requests remaining
        and `t` the number of seconds until the window resets.
    Retry-After:
      schema:
        type: integer
        example: 60
      description: >-
        The number of seconds to wait before making a new request after hitting
        the rate limit.
  responses:
    BadRequest:
      description: The request was unacceptable, often due to missing an invalid parameter.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_REQUEST
              message: The request was invalid.
              documentationUrl: https://developer.folk.app/api-reference/errors#bad-request
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    Unauthorized:
      description: No valid API key provided.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: No valid API key provided.
              documentationUrl: https://developer.folk.app/api-reference/errors#unauthorized
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    PaymentRequired:
      description: The workspace doesn’t have enough credits to perform the request.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_CREDITS
              message: 'Not enough enrichment credits: 12 needed, 5 left.'
              documentationUrl: https://developer.folk.app/api-reference/errors#payment-required
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    Forbidden:
      description: The API key doesn’t have permissions to perform the request.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: FORBIDDEN
              message: The API key doesn’t have permissions to perform the request.
              documentationUrl: https://developer.folk.app/api-reference/errors#forbidden
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    NotFound:
      description: The requested resource doesn’t exist.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RESOURCE_NOT_FOUND
              message: The requested resource was not found.
              documentationUrl: https://developer.folk.app/api-reference/errors#not-found
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    Conflict:
      description: A request with the same `Idempotency-Key` is still being processed.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: IDEMPOTENCY_REQUEST_IN_PROGRESS
              message: >-
                A request with the same Idempotency-Key is still being
                processed. Retry once it has completed.
              documentationUrl: https://developer.folk.app/api-reference/idempotency#errors
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    UnprocessableEntity:
      description: >-
        The request was unacceptable, often due to missing or invalid
        parameters.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNPROCESSABLE_ENTITY
              message: Invalid query parameters
              documentationUrl: >-
                https://developer.folk.app/api-reference/errors#unprocessable-entity
              details:
                issues:
                  - code: too_small
                    minimum: 1
                    type: number
                    inclusive: true
                    exact: false
                    message: Number must be greater than or equal to 1
                    path:
                      - limit
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    TooManyRequests:
      description: >-
        Too many requests hit the API too quickly. We recommend an exponential
        backoff of your requests.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Limit-Burst:
          $ref: '#/components/headers/X-RateLimit-Limit-Burst'
        X-RateLimit-Remaining-Burst:
          $ref: '#/components/headers/X-RateLimit-Remaining-Burst'
        X-RateLimit-Reset-Burst:
          $ref: '#/components/headers/X-RateLimit-Reset-Burst'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            error:
              code: TOO_MANY_REQUESTS
              message: You have exceeded your rate limit.
              documentationUrl: https://developer.folk.app/api-reference/errors#rate-limiting
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
              details:
                policy: burst
                limit: 20
                remaining: 0
                windowSeconds: 2
                retryAfter: '2025-10-01T12:00:02.000Z'
                policies:
                  - policy: default
                    limit: 600
                    remaining: 412
                    windowSeconds: 60
                    retryAfter: '2025-10-01T12:01:00.000Z'
                  - policy: burst
                    limit: 20
                    remaining: 0
                    windowSeconds: 2
                    retryAfter: '2025-10-01T12:00:02.000Z'
    InternalServerError:
      description: Something went wrong on our end.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_SERVER_ERROR
              message: An internal server error occurred.
              documentationUrl: >-
                https://developer.folk.app/api-reference/errors#internal-server-error
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
    ServiceUnavailable:
      description: The server is overloaded or down for maintenance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SERVICE_UNAVAILABLE
              message: The service is currently unavailable.
              documentationUrl: >-
                https://developer.folk.app/api-reference/errors#service-unavailable
              requestId: 123e4567-e89b-12d3-a456-426614174000
              timestamp: '2025-10-01T12:00:00Z'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: TOO_MANY_REQUESTS
            message:
              type: string
              example: You have exceeded your rate limit.
            documentationUrl:
              type: string
              format: uri
              example: https://developer.folk.app/api-reference/errors#rate-limiting
            requestId:
              type: string
              format: uuid
              example: 123e4567-e89b-12d3-a456-426614174000
            timestamp:
              type: string
              format: date-time
              example: '2025-10-01T12:00:00Z'
            details:
              type: object
              additionalProperties: true
              example:
                policy: burst
                limit: 20
                remaining: 0
                windowSeconds: 2
                retryAfter: '2025-10-01T12:00:02.000Z'
          required:
            - code
            - message
            - documentationUrl
            - requestId
            - timestamp
      required:
        - error
      description: Error response containing error details.
    RateLimitError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: TOO_MANY_REQUESTS
            message:
              type: string
              example: You have exceeded your rate limit.
            documentationUrl:
              type: string
              format: uri
              example: https://developer.folk.app/api-reference/errors#rate-limiting
            requestId:
              type: string
              format: uuid
              example: 123e4567-e89b-12d3-a456-426614174000
            timestamp:
              type: string
              format: date-time
              example: '2025-10-01T12:00:00Z'
            details:
              type: object
              properties:
                policy:
                  type: string
                  enum:
                    - default
                    - burst
                  description: The name of the rate limit policy.
                limit:
                  type: integer
                  description: The maximum number of requests allowed per window.
                remaining:
                  type: integer
                  description: The number of requests remaining in the current window.
                windowSeconds:
                  type: integer
                  description: The length of the window, in seconds.
                retryAfter:
                  type: string
                  format: date-time
                  description: When the current window resets.
                policies:
                  type: array
                  items:
                    type: object
                    properties:
                      policy:
                        type: string
                        enum:
                          - default
                          - burst
                        description: The name of the rate limit policy.
                      limit:
                        type: integer
                        description: The maximum number of requests allowed per window.
                      remaining:
                        type: integer
                        description: >-
                          The number of requests remaining in the current
                          window.
                      windowSeconds:
                        type: integer
                        description: The length of the window, in seconds.
                      retryAfter:
                        type: string
                        format: date-time
                        description: When the current window resets.
                    required:
                      - policy
                      - limit
                      - remaining
                      - windowSeconds
                      - retryAfter
                  description: >-
                    The status of every rate limit policy applied to the
                    request.
              required:
                - policy
                - limit
                - remaining
                - windowSeconds
                - retryAfter
                - policies
              description: >-
                The exceeded rate limit policy. When several are exceeded, the
                one resetting last.
          required:
            - code
            - message
            - documentationUrl
            - requestId
            - timestamp
            - details
      required:
        - error
      description: Error response returned when a rate limit is exceeded.
  securitySchemes:
    bearerApiKeyAuth:
      type: http
      scheme: bearer
      description: API key for authentication

````

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