The API method for Emails & Activities API Reference is not working

I provided the appropriate scopes, tried both through a personal token and through the oauth2.

I pass the API version in the headers API-Version 2024-10

mutation {create_custom_activity (color: SLATE_BLUE, icon_id: TRIPOD, name: “Emails”) {id}}

{
“errors”: [
{
“message”: “Field ‘create_custom_activity’ doesn’t exist on type ‘Mutation’”,
“locations”: [
{
“line”: 1,
“column”: 11
}
],
“path”: [
“mutation”,
“create_custom_activity”
],
“extensions”: {
“code”: “undefinedField”,
“typeName”: “Mutation”,
“fieldName”: “create_custom_activity”
}
}
],
“account_id”: 26709801
}

1 Like

Hello there @i.kril and welcome to the community!

I hope you like it here :muscle:

I know you said you are passing the 2024-10 API-version in the headers, but are you 100% sure that is the case? This error shows up for older API versions.

What happens if you run it from your API Playground?

Looking forward to hearing from you :smile:

Cheers,
Matias

1 Like

You can also add the following to your query to be sure:

{
  # ...
  version {
    value
  }
}

Then you’ll get this if you are on the correct version:

{
  "data": {
   ...
    "version": {
      "value": "2024-10"
    }
  },
  "account_id": 123456
}
1 Like

Okay, I figured it out, thanks for the help, the next question is, how do I attach a file to the timeline? And why can I create a timeline only for custom activities, but not for default ones, for example, like email?

Hello there @i.kril

As of today, there is no way to add a file to a timeline item via the API.

The API for emails and activities is for now limited to custom activities. This might change in the future!

Cheers,
Matias