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

# Create a label for a customer

> Creates a new label for a Verified Customer with a specified amount. Labels help organize and track funds within a customer's balance. Returns the location of the created label resource in the response header.



## OpenAPI

````yaml post /customers/{id}/labels
openapi: 3.1.0
info:
  title: Dwolla API
  description: Dwolla API Documentation
  contact:
    name: Dwolla Developer Relations Team
    url: https://developers.dwolla.com
    email: api@dwolla.com
  version: '2.0'
  termsOfService: https://www.dwolla.com/legal/tos/
  license:
    name: MIT
    url: https://github.com/Dwolla/dwolla-openapi/blob/master/LICENSE
servers:
  - url: https://api.dwolla.com
    description: Production server
  - url: https://api-sandbox.dwolla.com
    description: Sandbox server
security:
  - clientCredentials: []
tags:
  - name: tokens
    description: Operations related to Application Access Tokens
  - name: root
    description: Root API operations
  - name: accounts
    description: Operations related to Accounts
  - name: customers
    description: Operations related to Customers
  - name: kba
    description: Operations related to Knowledge-Based Authentication
  - name: beneficial owners
    description: Operations related to Beneficial Owners
  - name: documents
    description: Operations related to Documents
  - name: exchanges
    description: Operations related to Exchanges
  - name: exchange sessions
    description: Operations related to Exchange Sessions
  - name: funding sources
    description: Operations related to Funding Sources
  - name: transfers
    description: Operations related to Transfers
  - name: labels
    description: Operations related to Labels
  - name: mass payments
    description: Operations related to Mass Payments
  - name: events
    description: Operations related to Events
  - name: webhook subscriptions
    description: Operations related to Webhook Subscriptions
  - name: webhooks
    description: Operations related to Webhooks
  - name: client tokens
    description: Operations related to Client Tokens
  - name: sandbox simulations
    description: Sandbox-only operations for simulating processing of bank transfers
paths:
  /customers/{id}/labels:
    post:
      tags:
        - labels
      summary: Create a label for a customer
      description: >-
        Creates a new label for a Verified Customer with a specified amount.
        Labels help organize and track funds within a customer's balance.
        Returns the location of the created label resource in the response
        header.
      operationId: createCustomerLabel
      parameters:
        - name: id
          in: path
          description: ID of customer to create a label for
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/Accept'
      requestBody:
        required: true
        description: Parameters to create a customer label
        content:
          application/json:
            schema:
              required:
                - amount
              type: object
              properties:
                amount:
                  type: object
                  properties:
                    currency:
                      type: string
                      example: USD
                    value:
                      type: string
                      example: '12.34'
      responses:
        '201':
          description: create
          headers:
            Location:
              $ref: '#/components/headers/Location'
        '400':
          description: Bad Request
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '403':
          description: Forbidden
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: Not authorized to create customer label
        '404':
          description: Not Found
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NotFound
                  message:
                    type: string
                    example: Customer not found
      x-codeSamples:
        - lang: bash
          source: >
            POST
            https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C/labels

            Content-Type: application/vnd.dwolla.v1.hal+json

            Accept: application/vnd.dwolla.v1.hal+json

            Authorization: Bearer
            pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY


            {
                "amount": {
                    "currency": "USD",
                    "value": "10.00"
                }
            }
        - lang: javascript
          source: |
            // Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
            var customerUrl =
              "https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C";
            var requestBody = {
              amount: {
                currency: "USD",
                value: "10.00",
              },
            };

            dwolla
              .post(`${customerUrl}/labels`, requestBody)
              .then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31'
        - lang: python
          source: >
            # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python

            customer_url =
            'https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C'

            request_body = {
              'amount': {
                'currency': 'USD',
                'value': '10.00'
              }
            }


            label = app_token.post('%s/labels' % customer_url, request_body)

            label.headers['location'] # =>
            'https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31'
        - lang: php
          source: >
            <?php

            // Using dwollaswagger -
            https://github.com/Dwolla/dwolla-swagger-php

            $customersApi = new DwollaSwagger\CustomersApi($apiClient);


            $label = $customersApi->createLabel([
              'amount' => [
                'currency' => 'USD',
                'value' => '10.00'
              ]
            ],
            "https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C");

            $label; # =>
            "https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31"

            ?>
        - lang: ruby
          source: >
            # Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby

            customer_url =
            'https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C'

            request_body = {
              :amount => {
                :currency => "USD",
                :value => "10.00"
              }
            }


            label = app_token.post "#{customer_url}/labels", request_body

            label.response_headers[:location] # =>
            "https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31"
components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: true
      description: >-
        The media type of the response. Must be
        application/vnd.dwolla.v1.hal+json
      schema:
        type: string
        enum:
          - application/vnd.dwolla.v1.hal+json
        default: application/vnd.dwolla.v1.hal+json
  headers:
    Location:
      description: The location of the created resource
      schema:
        type: string
  schemas:
    BadRequestError:
      title: BadRequestError
      description: Error response schema for 400 Bad Request
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: BadRequest
        message:
          type: string
          example: The request body contains bad syntax or is incomplete.
  securitySchemes:
    clientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /token
          x-speakeasy-token-endpoint-authentication: client_secret_basic
          scopes: {}

````