Skip to main content
POST
/
organizations
Criar Organizacao
curl --request POST \
  --url https://api.example.com/organizations \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "<string>",
  "currency": "<string>",
  "billingThresholdId": "<string>",
  "phone": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>"
  },
  "tax": {
    "taxId": "<string>",
    "taxType": "<string>"
  }
}
'
{
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "subscriptionId": null,
  "iamExternalRef": "org_workos_def456",
  "billingExternalRef": "cus_stripe_def456",
  "name": "New Corp",
  "email": "billing@newcorp.com",
  "currency": "BRL",
  "phone": "+5511999999999",
  "address": {
    "line1": "Av Paulista 1000",
    "line2": null,
    "city": "Sao Paulo",
    "state": "SP",
    "postalCode": "01310-100",
    "country": "BR"
  },
  "taxId": "12345678000100",
  "taxType": "CNPJ",
  "offboardingStatus": "ACTIVE",
  "createdAt": "2026-03-25T14:00:00.000Z",
  "updatedAt": "2026-03-25T14:00:00.000Z"
}
Requer permissao organizations:write.

Headers

Authorization
string
required
Bearer token.

Corpo da Requisicao

name
string
required
Nome da organizacao. Max 255 caracteres.
email
string
required
Email de billing. Deve ser unico.
currency
string
required
Um de: USD, BRL, EUR.
billingThresholdId
string
required
Deve corresponder a moeda da organizacao.
phone
string
Numero de telefone.
address
object
Endereco de billing.
tax
object
Informacoes fiscais.

Resposta

organizationId
string
UUID da organizacao.
billingThresholdId
string
ID do limite de faturamento.
subscriptionId
string
O ID da assinatura ativa.
iamExternalRef
string
Referencia externa do provedor de identidade.
billingExternalRef
string
Referencia externa do provedor de pagamento.
name
string
Nome da organizacao.
email
string
Email de billing.
currency
string
Codigo da moeda.
phone
string
Numero de telefone.
address
object
Endereco de billing.
taxId
string
Identificador fiscal.
taxType
string
Tipo de identificador fiscal.
offboardingStatus
string
O status de offboarding da organizacao.
createdAt
string
Timestamp de criacao.
updatedAt
string
Timestamp da ultima atualizacao.
{
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "subscriptionId": null,
  "iamExternalRef": "org_workos_def456",
  "billingExternalRef": "cus_stripe_def456",
  "name": "New Corp",
  "email": "billing@newcorp.com",
  "currency": "BRL",
  "phone": "+5511999999999",
  "address": {
    "line1": "Av Paulista 1000",
    "line2": null,
    "city": "Sao Paulo",
    "state": "SP",
    "postalCode": "01310-100",
    "country": "BR"
  },
  "taxId": "12345678000100",
  "taxType": "CNPJ",
  "offboardingStatus": "ACTIVE",
  "createdAt": "2026-03-25T14:00:00.000Z",
  "updatedAt": "2026-03-25T14:00:00.000Z"
}

Exemplos de Codigo

curl -X POST https://api.awsales.io/admin/organizations \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme Corp",
  "email": "billing@acme.com",
  "currency": "BRL",
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c"
}'

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
500internal_server_errorOcorreu um erro inesperado