> This page is for Schema Service, version v3 (latest) (default).
> For other versions, use one of these documentation indexes:
> - v3 (latest) (default): https://autodesk.ferndocs.com/schema/schema-service/v3/llms.txt
> - v2: https://autodesk.ferndocs.com/schema/schema-service/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://autodesk.ferndocs.com/schema/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://autodesk.ferndocs.com/schema/_mcp/server.

# Task 2 - Create and fetch an Organization

Task 2 - Create an Organization

An organization typically represents a real-world organization. It is a container of all the groups, libraries, and schemas of that organization. So, in this step you create an organization to hold all the schemas that you will create for this tutorial.

You do not need any special privileges to create an organization. Every organization you create is private by default. You will have admin privileges to the organization; and groups, libraries, and schemas within that organization.

## Expected task outcome

By the end of this task you will be able to:

* Create a new organization.
* Fetch details of organization.

## Endpoints used in this task

You will use the following API endpoints in this task:

.. list-table::
:widths: 10, 50, 40
:header-rows: 1

* * Method
  * Endpoint
  * Operation
* * POST
  * /organizations
  * `Create an Organization`\_
* * GET
  * /organizations/\{organizationId}
  * `Fetch an Organization`\_

Step 1 - Create a Organization

In Postman, on the sidebar, Select **Task 2 > POST Create a Organization** and click **Send**. The equivalent cURL request is as follows.

**Note:** You can retrieve the resource information of a tenant using the requested tenant ID in a two-legged context [Get tenantId](https://forge.autodesk.com/en/docs/oauth/v2/reference/http/id-tenant-GET/).

## Request

```ruby
 curl -X POST \
         'https://developer-stg.api.autodesk.com/schema/v3/organizations' \
      -H 'Authorization: Bearer <YOUR_ACCERSS_TOKEN>' \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -D '{
           "name": "<ORGANIZATION_ID>",
           "tenantId": "<TENANT_ID>",
           "title": "<ORGANIZATION_TITLE>",
           "description": "<ORGANIZATION DESCRIPTION>"
          }
```

|

## Response

```json

{
 "name": "<ORGANIZATION_ID>",
 "title": "<ORGANIZATION_TITLE>",
 "tenantId": "<TENANT_ID>",
 "description": "<ORGANIZATION DESCRIPTION>",
 "createdBy": "zXIoQYTOAeEHvO1wafII0yjraOYfPnN4",
 "createTime": "2022-07-20T08:26:25Z",
 "lastModifiedBy": "SMS4QCDNNDMB",
 "lastModifiedTime": "2022-08-11T03:01:11Z"
}
```

Step 2 - Fetch Organization

This topic explains how to fetch the details of a specific organization and the permission you have been granted.

In postman, Select **Task 2 > GET Fetch Organization** and click **Send**. The equivalent cURL request is as follows.

## Request

```ruby
 curl -X GET \
         'https://developer-stg.api.autodesk.com/schema/v3/organizations/<ORGANIZATION_ID>' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6...' \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
```

|

## Response

```json

{
 "name": "<ORGANIZATION_ID>",
 "title": "<ORGANIZATION_TITLE>",
 "tenantId": "<TENANT_ID>",
 "description": "<ORGANIZATION_DESCRIPTION>",
 "userData": {
     "additionalProp1": "string",
     "additionalProp2": "string",
     "additionalProp3": "string"
 },
 "permissions": [
     {
         "Id": "read",
         "Effect": "Allow",
         "Subjects": {
             "Service": [
                 "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J"
             ]
         },
         "Action": "read"
     },
     {
         "Id": "admin",
         "Effect": "Allow",
         "Subjects": {
             "Service": [
                 "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J"
             ]
         },
         "Action": "admin"
     },
     {
         "Id": "write",
         "Effect": "Allow",
         "Subjects": {
             "Service": [
                 "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J"
             ]
         },
         "Action": "write"
     },
     {
         "Id": "delete",
         "Effect": "Allow",
         "Subjects": {
             "Service": [
                 "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J"
             ]
         },
         "Action": "delete"
     }
 ],
 "createdBy": "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J",
 "createTime": "2022-07-29T11:43:24Z",
 "lastModifiedBy": "AYK3q05maQE8bVpTG2sTnYwPj0Jn6f8J",
 "lastModifiedTime": "2022-08-01T04:39:14Z"
}
```