Create an activity
curl --request POST \
--url https://api.metal.ai/v1/activities \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"subject": "<string>",
"type": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": [
"<string>"
],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": true
}
'import requests
url = "https://api.metal.ai/v1/activities"
payload = {
"subject": "<string>",
"type": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": ["<string>"],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": True
}
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
subject: '<string>',
type: '<string>',
startedAt: '2023-11-07T05:31:56Z',
endedAt: '2023-11-07T05:31:56Z',
participants: [{id: '<string>', type: '<string>'}],
deals: ['<string>'],
externalReference: {source: '<string>', id: '<string>'},
isPrivate: true
})
};
fetch('https://api.metal.ai/v1/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/activities"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"endedAt\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"deals\": [\n \"<string>\"\n ],\n \"externalReference\": {\n \"source\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"isPrivate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "<string>",
"subject": "Intro call with management",
"type": "Meeting",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": [
"<string>"
],
"relatedResources": [
{
"id": "<string>",
"type": "<string>"
}
],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Create an activity
Creates a new activity.
POST
/
v1
/
activities
Create an activity
curl --request POST \
--url https://api.metal.ai/v1/activities \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"subject": "<string>",
"type": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": [
"<string>"
],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": true
}
'import requests
url = "https://api.metal.ai/v1/activities"
payload = {
"subject": "<string>",
"type": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": ["<string>"],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": True
}
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
subject: '<string>',
type: '<string>',
startedAt: '2023-11-07T05:31:56Z',
endedAt: '2023-11-07T05:31:56Z',
participants: [{id: '<string>', type: '<string>'}],
deals: ['<string>'],
externalReference: {source: '<string>', id: '<string>'},
isPrivate: true
})
};
fetch('https://api.metal.ai/v1/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/activities"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"endedAt\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"deals\": [\n \"<string>\"\n ],\n \"externalReference\": {\n \"source\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"isPrivate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "<string>",
"subject": "Intro call with management",
"type": "Meeting",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"participants": [
{
"id": "<string>",
"type": "<string>"
}
],
"deals": [
"<string>"
],
"relatedResources": [
{
"id": "<string>",
"type": "<string>"
}
],
"externalReference": {
"source": "<string>",
"id": "<string>"
},
"isPrivate": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Authorizations
The Client ID of your API key.
The secret value of your API key.
Body
application/json
Response
Creates a new activity.
Show child attributes
Show child attributes
⌘I

