> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Create an organization

`POST /api/web/v1/organizations`

Create an organization. Caller requires the ORGANIZATIONS:ADD permission.

## Request Body

Required.

### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "The description of the organization."
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the organization. This value must be provided when creating an organization."
    },
    "logoUri": {
      "type": "string",
      "description": "The URI of the logo to display when showing organizations.",
      "example": "https://account.mycompany.com/images/logo.png"
    },
    "name": {
      "type": "string",
      "description": "The name of the organization. This value must be provided when creating an organization."
    }
  },
  "description": "Parameters defining the new organization.",
  "title": "OrganizationParms"
}
```

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "required": [
    "displayName",
    "id",
    "name"
  ],
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "The description of the organization."
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the organization."
    },
    "id": {
      "type": "string",
      "description": "The unique UUID assigned to the organization when it is created."
    },
    "logoUri": {
      "type": "string",
      "description": "The URI of the logo to display when showing organizations.",
      "example": "https://account.mycompany.com/images/logo.png"
    },
    "name": {
      "type": "string",
      "description": "The name of the organization."
    }
  },
  "description": "Organization defines the attributes of an organization used in B2B scenarios.",
  "title": "Organization"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "ORGANIZATIONS:ADD"
    ]
  }
]
```
