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

# Create account

> Use this endpoint to create a new Account under your Company. Use this when you need to programmatically set up a new team, department, or budget owner with its own campaigns and billing method.

###### Required fields:
- `name` - display name of the Account

###### Optional fields:
- `billingMethod` - the initial billing method to attach to the Account
  - `billingMethod.type` - currently must be `INV` (invoice). Other billing types (Prepay, PO, CC) must be set up via the Snappy Dashboard.
  - `billingMethod.spendingLimit.amount` - billing amount
  - `billingMethod.name` - display name of the billing method

###### Optional parameters:
- `Snappy-Account-Id` header - optional account scoping
- `Snappy-Company-Id` header - optional company scoping

###### Behavior Notes:
- Returns `201` with the new Account details wrapped in `{ data: { id, name } }` on success.
- Returns `409` when an Account with the same name already exists in the Company.
- Returns `422` for business-rule violations (e.g. invalid billing configuration).
- Currently only invoice (`INV`) billing methods can be created via the API. To set up Prepay, PO, or Credit Card billing, create the Account first and then configure billing via the Snappy Dashboard.

#### Permissions
- Requires: `accounts:create`



## OpenAPI

````yaml post /v3/accounts
openapi: 3.0.3
info:
  title: Snappy Public API v3
  version: 3.0.0
  contact:
    name: Snappy Support
    email: info@snappy.com
  description: >-
    Welcome to the Snappy API reference documentation!

    You can use this API to integrate with Snappy and spread smiles to your
    employees/clients/customers and much more.

    So let's get started!
servers:
  - url: https://api.snappy.com/public-api
    description: Base API URL
  - url: https://mtls-api.snappy.com/public-api
    description: >-
      ## mTLS URL

      You can also use mTLS to enhance your API security. To get your specific
      certificates please contact our support.

      Once you configure the certificated correctly, you need to also update
      endpoints to use the following secure api base URL:
security: []
tags:
  - name: Products
    description: >-
      Use these endpoints to retrieve products and tags for building catalog and
      browse experiences in your UI.
  - name: Collections
    description: >-
      Use these endpoints to retrieve products within curated collections for
      marketplace and browse experiences.
  - name: Variants
    description: >-
      Use these endpoints to retrieve variants, variant pricing, and country
      availability for orderable product SKUs.
  - name: Billing Methods
    description: >-
      A **Billing Method** is the funding source attached to an **Account** -
      for example, a Purchase Order (PO), Invoice, Prepay deposit, or Credit
      Card. Use these endpoints to retrieve billing method details such as
      remaining balance, status, and expiration.
  - name: Accounts
    description: >-
      An **Account** is a sub-entity within a **Company**, used to organize
      campaigns and gift sends. Use these endpoints to list, retrieve, and
      create accounts.
  - name: API Keys
    description: >-
      Use these endpoints to manage API keys for programmatic access. Key
      management requires company owner privileges.
  - name: Orders
    description: >-
      Use these endpoints to place, retrieve, cancel, and validate orders and
      shipping addresses.
paths:
  /v3/accounts:
    post:
      tags:
        - Accounts
      summary: Create account
      description: >-
        Use this endpoint to create a new Account under your Company. Use this
        when you need to programmatically set up a new team, department, or
        budget owner with its own campaigns and billing method.


        ###### Required fields:

        - `name` - display name of the Account


        ###### Optional fields:

        - `billingMethod` - the initial billing method to attach to the Account
          - `billingMethod.type` - currently must be `INV` (invoice). Other billing types (Prepay, PO, CC) must be set up via the Snappy Dashboard.
          - `billingMethod.spendingLimit.amount` - billing amount
          - `billingMethod.name` - display name of the billing method

        ###### Optional parameters:

        - `Snappy-Account-Id` header - optional account scoping

        - `Snappy-Company-Id` header - optional company scoping


        ###### Behavior Notes:

        - Returns `201` with the new Account details wrapped in `{ data: { id,
        name } }` on success.

        - Returns `409` when an Account with the same name already exists in the
        Company.

        - Returns `422` for business-rule violations (e.g. invalid billing
        configuration).

        - Currently only invoice (`INV`) billing methods can be created via the
        API. To set up Prepay, PO, or Credit Card billing, create the Account
        first and then configure billing via the Snappy Dashboard.


        #### Permissions

        - Requires: `accounts:create`
      parameters:
        - schema:
            type: string
            description: Optional account identifier for swag validation/filtering.
            example: acc123456
          required: false
          description: Optional account identifier for swag validation/filtering.
          name: snappy-account-id
          in: header
        - schema:
            type: string
            description: Optional company identifier for swag validation/filtering.
            example: cmp123456
          required: false
          description: Optional company identifier for swag validation/filtering.
          name: snappy-company-id
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountV3Body'
      responses:
        '201':
          description: Created account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleAccountResponseV3'
        '400':
          description: Bad Request - Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV3'
        '403':
          description: Forbidden - Insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV3'
      security:
        - ApiKeyAuthentication: []
components:
  schemas:
    CreateAccountV3Body:
      type: object
      properties:
        name:
          type: string
          description: The name of the account.
          example: Snappy
        billingMethod:
          $ref: '#/components/schemas/BillingMethodV3'
      required:
        - name
      additionalProperties: false
      description: Create account request body.
      example:
        name: Snappy
        billingMethod:
          type: INV
          spendingLimit:
            amount: 100
          name: Invoice 1
    SingleAccountResponseV3:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AccountV3'
      required:
        - data
      description: JSON:API single-resource envelope for an account.
    ErrorResponseV3:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
          example: Product not found.
        errorCode:
          type: string
          description: Structured error code.
          example: 404_PROD_001
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
                example: Product with id 'q1w2e3r4t5' was not found
              path:
                type: string
                description: Dot-separated path to the field that caused the error.
                example: pathParameters.productId
              errorCode:
                type: string
                example: 404_PROD_001
            required:
              - message
              - path
          description: Optional field-level error details.
      required:
        - message
        - errorCode
      description: Standard v3 error envelope.
    BillingMethodV3:
      type: object
      properties:
        type:
          type: string
          enum:
            - INV
          description: The type of the billing method.
          example: INV
        spendingLimit:
          type: object
          properties:
            amount:
              type: number
              description: The amount of the billing method spending limit.
              example: 100
          required:
            - amount
          additionalProperties: false
          description: Spending limit configuration for the billing method.
        name:
          type: string
          description: The name of the billing method.
          example: Invoice 1
      required:
        - type
        - spendingLimit
        - name
      additionalProperties: false
      description: Billing method configuration.
    AccountV3:
      type: object
      properties:
        id:
          type: string
          description: The id of the account.
          example: a12bcd34
        name:
          type: string
          description: The name of the account.
          example: Snappy
      description: Account object.
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: X-Api-Key
      description: |-
        ## Company Level Authentication

        Include your API key in the `X-Api-Key` header for every request:
        ```
        X-Api-Key: YOUR_API_KEY
        ```

````