EDITIONS API
Manage resources and operations related to editions.
GET All Editions
GET https://api.app.vanihq.com/vani/api/v1/editions
Retrieves the edition details based on the specified fields. If no fields are provided, the API returns all the details about the edition.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| fields | string | query | Optional |
Specifies the fields (comma-separated) to retrieve.
Allowed values: state, created_time, last_modified_time, edition_type_name, edition_name, edition_role_name,
edition_id,
edition_owner_id,
is_default,
uri.
|
Responses
200
success
200
using filter fields
200
User is not part of any edition
success - Response
{
"data": {
"editions_info": [
{
"created_time": "Sun, 09 Apr 2023, 08:43:02",
"last_modified_time": "Sun, 09 Apr 2023, 08:43:02",
"edition_id": "75918186",
"edition_type_name": "ORG",
"state": "ACTIVE",
"edition_name": "OrgEditionTest",
"edition_owner_id": "69828190",
"is_default": "true",
"uri": "/vani/api/v1/editions/75918186"
},
{
"created_time": "Fri, 03 Jan 2025, 11:55:58",
"last_modified_time": "Wed, 29 Jan 2025, 18:26:53",
"edition_id": "96499735",
"edition_type_name": "TEAM",
"state": "ACTIVE",
"edition_name": "REST API TEAM V1 1",
"edition_owner_id": "96384499",
"uri": "/vani/api/v1/editions/96499735"
},
{
"created_time": "Tue, 21 Jan 2025, 17:04:53",
"last_modified_time": "Tue, 21 Jan 2025, 17:06:52",
"edition_id": "97375109",
"edition_type_name": "ORG",
"state": "ACTIVE",
"edition_name": "NR's ORG",
"edition_owner_id": "96384499",
"uri": "/vani/api/v1/editions/97375109"
},
{
"created_time": "Fri, 31 Jan 2025, 17:11:31",
"last_modified_time": "Fri, 31 Jan 2025, 17:11:31",
"edition_id": "98587682",
"edition_type_name": "ORG",
"state": "ACTIVE",
"edition_name": "testing",
"edition_owner_id": "96384499",
"uri": "/vani/api/v1/editions/98587682"
}
]
},
"message": "Editions fetched successfully",
"request_uri": "/vani/api/v1/editions",
"status": "success"
}
Code Examples
cURL
Command line HTTP client
cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
GET Single Edition
GET https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}
Retrieves information for a specific edition based on the provided edition_id.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| fields | string | query | Optional |
Specifies the fields (comma-separated) to retrieve.
Allowed values: state, created_time, last_modified_time, edition_type_name, edition_name, edition_role_name,
edition_id,
edition_owner_id,
is_default,
uri.
|
| edition_id | string | path | Required | The unique ID of the edition. |
Responses
200
success
200
using filter fields
401
with invalid apikey
success - Response
{
"data": {
"edition_info": {
"created_time": "Tue, 28 May 2024, 15:34:44",
"last_modified_time": "Tue, 28 May 2024, 15:35:02",
"edition_id": "60029715808",
"edition_type_name": "TEAM",
"state": "ACTIVE",
"edition_name": "Boxible",
"edition_owner_id": "60029267674",
"uri": "/vani/api/v1/editions/60029715808/teams"
}
},
"message": "Editions fetched successfully",
"request_uri": "/vani/api/v1/editions/60029715808",
"status": "success"
}
Code Examples
cURL
Command line HTTP client
cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
POST Team Edition Creation
POST https://api.app.vanihq.com/vani/api/v1/editions
Creates a new edition and a team.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| team_name | string | body | Based on Request | Name of the team to be created. |
| description | string | body | Based on Request | Brief description about the team. |
| plan_type | string | body | Based on Request |
Specifies the nature of the plan. Allowed values: FREE, TRIAL. (The Free plan will be selected when the plan_type is not provided)
|
Request Body
JSON
{
"team_name": "TeamEdition",
"description": "testing team edition creation",
"plan_type": "TRIAL"
}
Responses
200
success
409
already created edition
success - Response
{
"data": {
"current_user_id": "98722154",
"edition_id": "98723605",
"team_id": 5265000000002003,
"team_name": "TeamEdition"
},
"message": "Team created successfully",
"request_uri": "/vani/api/v1/editions",
"status": "success"
}
Code Examples
cURL
Command line HTTP client
cURL
curl -X POST "https://api.app.vanihq.com/vani/api/v1/editions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"team_name": "TeamEdition",
"description": "testing team edition creation",
"plan_type": "TRIAL"
}'