POST /api/v1/teams
Authenticate with Authorization: Bearer YOUR_API_KEY and X-Project-Id: YOUR_PROJECT_ID. Replace path placeholders and example values with your project's values.
Parameters
| Name | Location | Type | Presence | Description |
|---|---|---|---|---|
X-Project-Id | header | string (uuid) | Required | Project UUID. Use the project associated with your API key. |
Request Body
Create request.json with the fields this operation requires. The examples read that file.
| Field | Type | Presence | Description |
|---|---|---|---|
description | string | Optional | |
discord_channels | string[] | Optional | |
handle | string | Required | |
members | string (uuid)[] | Optional | |
name | string | Required | |
notify_emails | string[] | Optional | |
pagerduty_services | string[] | Optional | |
phone_numbers | string[] | Optional | |
slack_channels | string[] | Optional |
JSON schema
{
"properties": {
"description": {
"type": "string"
},
"discord_channels": {
"items": {
"type": "string"
},
"type": "array"
},
"handle": {
"type": "string"
},
"members": {
"items": {
"$ref": "#/components/schemas/UUID"
},
"type": "array"
},
"name": {
"type": "string"
},
"notify_emails": {
"items": {
"type": "string"
},
"type": "array"
},
"pagerduty_services": {
"items": {
"type": "string"
},
"type": "array"
},
"phone_numbers": {
"items": {
"type": "string"
},
"type": "array"
},
"slack_channels": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"name",
"handle"
],
"type": "object"
}Examples
curl --request POST 'https://api.monoscope.tech/api/v1/teams' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'X-Project-Id: YOUR_PROJECT_ID' \
--header 'Content-Type: application/json' \
--data-binary @request.jsonimport requests
import json
with open("request.json") as body_file:
payload = json.load(body_file)
response = requests.post(
"https://api.monoscope.tech/api/v1/teams",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"X-Project-Id": "YOUR_PROJECT_ID",
"Content-Type": "application/json"
},
json=payload,
timeout=30,
)
response.raise_for_status()
print(response.text)import { readFile } from "node:fs/promises";
const payload = await readFile("request.json", "utf8");
const response = await fetch("https://api.monoscope.tech/api/v1/teams", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"X-Project-Id": "YOUR_PROJECT_ID",
"Content-Type": "application/json"
},
body: payload,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());Responses
HTTP 200
Response defined by the API schema.
| Field | Type | Presence | Description |
|---|---|---|---|
discord_channels | string[] | Required | |
members | object[] | Required | |
notify_emails | string[] | Required | |
pagerduty_services | string[] | Required | |
phone_numbers | string[] | Required | |
slack_channels | string[] | Required | |
summary | object | Required |
JSON schema
{
"properties": {
"discord_channels": {
"items": {
"type": "string"
},
"type": "array"
},
"members": {
"items": {
"$ref": "#/components/schemas/UserRef"
},
"type": "array"
},
"notify_emails": {
"items": {
"type": "string"
},
"type": "array"
},
"pagerduty_services": {
"items": {
"type": "string"
},
"type": "array"
},
"phone_numbers": {
"items": {
"type": "string"
},
"type": "array"
},
"slack_channels": {
"items": {
"type": "string"
},
"type": "array"
},
"summary": {
"$ref": "#/components/schemas/TeamSummary"
}
},
"required": [
"summary",
"members",
"notify_emails",
"slack_channels",
"discord_channels",
"phone_numbers",
"pagerduty_services"
],
"type": "object"
}HTTP 400
Refused; error.code says why
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
JSON schema
{
"properties": {
"error": {
"$ref": "#/components/schemas/ApiProblem"
}
},
"required": [
"error"
],
"type": "object"
}HTTP 401
Refused; error.code says why
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
JSON schema
{
"properties": {
"error": {
"$ref": "#/components/schemas/ApiProblem"
}
},
"required": [
"error"
],
"type": "object"
}