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

# Create Profile

> Create new profile in organization with tax info

## Overview

Create a new profile within your organization, including complete tax information for invoice generation.

## Request Body

<ParamField body="tax_info" type="object" required>
  Tax information object

  <Expandable title="tax_info properties">
    <ParamField body="tax_id" type="string" required>
      RFC (Registro Federal de Contribuyentes). Example: `XAXX010101000`
    </ParamField>

    <ParamField body="taxpayer" type="string" required>
      Legal name of the taxpayer
    </ParamField>

    <ParamField body="street" type="string">
      Street address
    </ParamField>

    <ParamField body="ext_num" type="string">
      External number
    </ParamField>

    <ParamField body="neighborhood" type="string">
      Neighborhood (Colonia)
    </ParamField>

    <ParamField body="city" type="string">
      City
    </ParamField>

    <ParamField body="state" type="string">
      State
    </ParamField>

    <ParamField body="country" type="string">
      Country
    </ParamField>

    <ParamField body="postal_code" type="string" required>
      Postal code (Código Postal)
    </ParamField>

    <ParamField body="fiscal_regimen" type="string" required>
      Fiscal regimen code (e.g., `601`)
    </ParamField>

    <ParamField body="cfdi_use" type="string" required>
      CFDI usage code (e.g., `G03`)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="email" type="string">
  Email address for the profile
</ParamField>

<ParamField body="phone_number" type="string">
  Phone number with country code (e.g., `+525512345678`)
</ParamField>

## Response

Returns the created profile object.

<ResponseField name="id" type="string">
  Unique profile identifier (UUID)
</ResponseField>

<ResponseField name="name" type="string">
  Profile name (derived from taxpayer)
</ResponseField>

<ResponseField name="email" type="string">
  Email address
</ResponseField>

<ResponseField name="tax_id" type="string">
  RFC
</ResponseField>

<ResponseField name="org_id" type="string">
  Organization ID
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://app.usatimbre.com/api/timbre/create-profile" \
    -H "Authorization: Bearer tmb_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "tax_info": {
        "tax_id": "XAXX010101000",
        "taxpayer": "Juan Pérez",
        "street": "Calle Principal 123",
        "ext_num": "123",
        "neighborhood": "Centro",
        "city": "Ciudad de México",
        "state": "CDMX",
        "country": "México",
        "postal_code": "12345",
        "fiscal_regimen": "601",
        "cfdi_use": "G03"
      },
      "email": "juan@example.com",
      "phone_number": "+525512345678"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.usatimbre.com/api/timbre/create-profile', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer tmb_your_api_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      tax_info: {
        tax_id: 'XAXX010101000',
        taxpayer: 'Juan Pérez',
        street: 'Calle Principal 123',
        ext_num: '123',
        neighborhood: 'Centro',
        city: 'Ciudad de México',
        state: 'CDMX',
        country: 'México',
        postal_code: '12345',
        fiscal_regimen: '601',
        cfdi_use: 'G03'
      },
      email: 'juan@example.com',
      phone_number: '+525512345678'
    })
  });
  const profile = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://app.usatimbre.com/api/timbre/create-profile',
      headers={
          'Authorization': 'Bearer tmb_your_api_key_here',
          'Content-Type': 'application/json'
      },
      json={
          'tax_info': {
              'tax_id': 'XAXX010101000',
              'taxpayer': 'Juan Pérez',
              'street': 'Calle Principal 123',
              'ext_num': '123',
              'neighborhood': 'Centro',
              'city': 'Ciudad de México',
              'state': 'CDMX',
              'country': 'México',
              'postal_code': '12345',
              'fiscal_regimen': '601',
              'cfdi_use': 'G03'
          },
          'email': 'juan@example.com',
          'phone_number': '+525512345678'
      }
  )
  profile = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Juan Pérez",
    "email": "juan@example.com",
    "phone_number": "+525512345678",
    "tax_id": "XAXX010101000",
    "org_id": "org_123456",
    "created_at": "2024-01-21T10:00:00Z"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Bad Request",
    "message": "Invalid RFC format"
  }
  ```

  ```json 409 theme={null}
  {
    "error": "Conflict",
    "message": "Profile with this RFC already exists"
  }
  ```
</ResponseExample>
