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

# Create contact

> Create a contact on the tenant. Only administrators can create contacts.

**Required scope:** `write:contacts`



## OpenAPI

````yaml POST /v1/{tenantId}/contacts
openapi: 3.1.0
info:
  title: Debbie API Docs
  description: >
    The Debbie API is a RESTful interface, allowing you to programmatically

    update, add and access your data in the platform. It provides predictable
    URLs

    for accessing resources, and uses built-in HTTP features to receive commands
    and

    return responses. This makes it easy to communicate with third party
    systems.


    ## Idempotency


    The Debbie API supports idempotency for non-idempotent requests through the
    optional `Idempotency-Key` header. 

    This ensures that retrying the same request multiple times will produce the
    same result, preventing duplicate operations.


    ### Using Idempotency Keys


    - Include an `Idempotency-Key` header with a unique string (we recommend
    UUIDs)  

    - Maximum key length is 64 characters

    - Keys are valid for 48 hours

    - Responses served from the idempotency cache include an
    `Idempotency-Cached` header


    ### Example

    ```http

    Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000

    ```


    ### Error Cases

    - Invalid key format: 400 Bad Request

    - Reusing a key for a different request: 400 Bad Request


    ### Best Practices

    - Use a new key for each unique business transaction

    - Use the same key when retrying a failed request 

    - Store keys with request details for debugging
  contact:
    email: api-support@debbie.dk
  version: v0.1.0
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Authorization
    description: Endpoints for interacting with authorization
  - name: Cases
    description: Endpoints for interacting with cases
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Creditors
    description: Endpoints for interacting with creditors
  - name: Contacts
    description: >-
      Endpoints for interacting with contacts. A contact is a third party the
      tenant communicates with or pays out to on behalf of a creditor — for
      example a locksmith hired during a collection case. Caseworkers pick
      contacts as email recipients on a case and as the recipient of a payout
      when creating a case voucher of a voucher type configured for it; only
      administrators manage them.
  - name: Ultimate creditors
    description: >-
      Endpoints for interacting with ultimate creditors. An ultimate creditor is
      the original creditor behind the creditor on a case — for example when a
      debt collection agency forwards cases on behalf of its own client. On
      cases with an ultimate creditor, the creditor template mentions (name,
      address and company identifier) use the details of the ultimate creditor.
  - name: Updates
    description: Endpoints for interacting with updates
  - name: Users
    description: Endpoints for interacting with updates
  - name: Files
    description: Endpoints for interacting with files
  - name: Case vouchers
    description: Endpoints for interacting with case vouchers
  - name: Voucher types
    description: The voucher types of the tenant, used to categorize case vouchers
  - name: Interactions
    description: >-
      Interactions are messages and notes on a case, for example an incoming
      message from a debtor.
  - name: Billing
    description: Endpoints for interacting with billing
  - name: Transaction accounts
    description: >-
      Endpoints for interacting with transaction accounts — the bank and payment
      service provider accounts that payments are registered on
  - name: Links
    description: Endpoints for generating links
  - name: Webhooks
    description: >-
      Debbie provides a range of webhooks. To try them out please visit Debbie
      Caseworker and navigate to Settings --> Developers --> Webhooks.
  - name: End reasons
    description: Endpoints for interacting with end reasons
  - name: Case groups
    description: Endpoints for interacting with case groups
  - name: Documents
    description: Endpoints for attaching documentation to a case or to a creditor
  - name: Case voucher allocations
    description: Apply creditor payments and credit notes to specific case vouchers.
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/contacts:
    post:
      tags:
        - Contacts
      summary: Create contact
      description: |-
        Create a contact on the tenant. Only administrators can create contacts.

        **Required scope:** `write:contacts`
      operationId: create-contact
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the tenant the contacts belong to
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewContact'
            example:
              name: Låsesmeden ApS
              email: kontakt@laasesmeden.dk
              phone:
                locale: '45'
                number: '12345678'
              registryIdentifier:
                scheme: DK:CVR
                value: '12345678'
              bankAccount:
                type: DANISH
                registrationNumber: '1234'
                accountNumber: '1234567890'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    NewContact:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the contact, e.g. the company or person
        email:
          type:
            - string
            - 'null'
          format: email
          description: Email address emails from a case can be sent to
        phone:
          type:
            - object
            - 'null'
          properties:
            locale:
              type: string
              example: '45'
              description: Country calling code without the plus
            number:
              type: string
              example: '12345678'
              description: The number without the country code
          required:
            - locale
            - number
          description: Phone number. null when unknown.
        registryIdentifier:
          oneOf:
            - $ref: '#/components/schemas/RegistryIdentifier'
          type:
            - object
            - 'null'
          description: >-
            Company or person identifier of the contact, e.g. a CVR number. null
            when unknown.
        bankAccount:
          oneOf:
            - $ref: '#/components/schemas/BankAccountDetails'
          type:
            - object
            - 'null'
          description: >-
            Bank account payouts to the contact are made to. null when the
            contact is only used as an email or phone recipient.
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the contact
        tenantId:
          type: string
          format: uuid
          description: Id of the tenant the contact belongs to
        name:
          type: string
          description: Name of the contact, e.g. the company or person
        email:
          type:
            - string
            - 'null'
          format: email
          description: Email address emails from a case can be sent to
        phone:
          type:
            - object
            - 'null'
          properties:
            locale:
              type: string
              example: '45'
              description: Country calling code without the plus
            number:
              type: string
              example: '12345678'
              description: The number without the country code
          required:
            - locale
            - number
          description: Phone number. null when unknown.
        registryIdentifier:
          oneOf:
            - $ref: '#/components/schemas/RegistryIdentifier'
          type:
            - object
            - 'null'
          description: >-
            Company or person identifier of the contact, e.g. a CVR number. null
            when unknown.
        bankAccount:
          oneOf:
            - $ref: '#/components/schemas/BankAccountDetails'
          type:
            - object
            - 'null'
          description: >-
            Bank account payouts to the contact are made to. null when the
            contact is only used as an email or phone recipient.
        createdAt:
          type: string
          format: date-time
          description: When the contact was created
        createdBy:
          type: object
          description: Who created the contact
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the contact was last updated. null when never updated.
        updatedBy:
          type:
            - object
            - 'null'
          description: Who last updated the contact. null when never updated.
      required:
        - id
        - tenantId
        - name
        - email
        - phone
        - registryIdentifier
        - bankAccount
        - createdAt
        - createdBy
        - updatedAt
        - updatedBy
    RegistryIdentifier:
      type: object
      properties:
        scheme:
          type: string
          enum:
            - DK:CVR
            - DK:CPR
            - NO:ORG
            - NO:ORGNR
            - SE:ORGNR
            - GLN
          description: The scheme of the registry identifier
        value:
          type: string
          example: '12345678'
          description: The identifier value, e.g. the CVR number
      required:
        - scheme
        - value
    BankAccountDetails:
      type: object
      properties:
        type:
          type: string
          enum:
            - DANISH
          description: Type of bank account details
        registrationNumber:
          type: string
        accountNumber:
          type: string
      required:
        - type
        - registrationNumber
        - accountNumber
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication can be done by using a bearer token in the Authorization
        header. This is done using the following format `Authorization: Bearer
        {token}`.

````

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