---
title: Create Organization Object
slug: api-marketplace/create-organization-object
description: Learn how to create organizations for a specific patron using our API. Accessible through a cURL command with headers and request parameters, our API returns a detailed JSON response containing crucial information like callback URL, access token, organiza
createdAt: 2023-05-30T17:36:22.000Z
---

## API Description

The provided API allows you to create organizations for a specific patron. By making a POST request to the specified endpoint, you can create organizations associated with a particular patron ID. The access token provided in response of this API can be used further to call the other ROC APIs.

## API Details

### Endpoint

:::CodeblockTabs
Production environment

```jsx
POST https://signzy.tech/api/v2/patrons/<patron-id>/organizations
```
:::

:::CodeblockTabs
UAT/Testing environment

```jsx
POST https://preproduction.signzy.tech/api/v2/patrons/<patron-id>/organizations
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**                                                      | **Required** |
| ------------- | ------------- | -------------------------------------------------------------------- | ------------ |
| identifier    | String        | The CIN (Corporate Identification Number)/ DIN of the company.       | Optional     |
| service       | String        | Specifies the service as "roc" (Registrar of Companies) in our case. | Optional     |
| callbackUrl   | String        | The URL to which the response will be sent.                          | Mandatory    |

```json
{
    "identifier": "<CIN/DIN number>",
    "service": "roc",
    "callbackUrl": "https://<callback_url>.com"
}
```

***

### Request headers

| Name          | Value            | Required  | Description                                                                                                |
| ------------- | ---------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/JSON | Mandatory | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://signzy.tech/api/v2/patrons/<patron-id>/organizations' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data '{
    "identifier": "U74900MH2011PTC216800",
    "service": "roc",
    "callbackUrl": "https://<callback_url>.com"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "identifier": "U74900MH2011PTC216800",
  "service": "roc",
  "callbackUrl": "https://<callback_url>.com"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://signzy.tech/api/v2/patrons/<patron-id>/organizations',
  headers: { 
    'Authorization': '<Token>', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("signzy.tech")
payload = json.dumps({
  "identifier": "U74900MH2011PTC216800",
  "service": "roc",
  "callbackUrl": "https://<callback_url>.com"
})
headers = {
  'Authorization': '<Token>',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/v2/patrons/<patron-id>/organizations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://signzy.tech/api/v2/patrons/<patron-id>/organizations"
  method := "POST"

  payload := strings.NewReader(`{
    "identifier": "U74900MH2011PTC216800",
    "service": "roc",
    "callbackUrl": "https://<callback_url>.com"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "<Token>")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter** | **Data Type** | **Description**                                                                         |
| ------------- | ------------- | --------------------------------------------------------------------------------------- |
| callbackUrl   | String        | The URL to which the response will be sent.                                             |
| accessToken   | String        | The access token for the created organization object, will be used in further ROC APIs. |
| id            | String        |                                                                                         |
| patronId      | String        | The patron ID associated with the organization object.                                  |
| identifier    | String        | The CIN (Corporate Identification Number)/DIN of the company.                           |
| service       | String        | The service associated with the organization. The value would be "roc" in our case.     |

:::CodeblockTabs
200

```json
{
    "callbackUrl": "https://<callback_url>.com",
    "accessToken": "<token_to_be_used_in_following_requests>",
    "id": "659d1b405e1e240027c02390",
    "patronId": "<patron-id>",
    "identifier": "U74900MH2011PTC216800",
    "service": "roc"
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

