Home

Tommy

v1.0.0

Contact: support@mytommy.com

Base URL
https://api.mytommy.com/v1

The Tommy API is organized around the REST methodology, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors. All requests are authenticated using an api-key which can be obtained from your developer dashboard.

Authentication

basicAuthhttp

HTTP Basic Authentication. Works over HTTP and HTTPS

Scheme: basic

api_keyapiKey

Provide your API key via the api_key header.

API Key: api_key in header

Account

Manage accounts and search across users and teams.

Search users

GET
https://api.mytommy.com/v1/accounts/search

Get all users and teams who's mobile or username match the given search term.

Parameters

termstringrequiredquery

Search term used to filter accounts

Response

200OKArray<any>

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Search users
curl -X GET 'https://api.mytommy.com/v1/accounts/search'
const response = await fetch('https://api.mytommy.com/v1/accounts/search', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/accounts/search', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/accounts/search')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/accounts/search')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/accounts/search", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get the current account

GET
https://api.mytommy.com/v1/me/current_account

Get the current user account.

Response

200OKany

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get the current account
curl -X GET 'https://api.mytommy.com/v1/me/current_account'
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/current_account')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/current_account')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/current_account", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 111,
  "type": "string",
  "user_id": 0,
  "team_id": 0,
  "name": "Acme Corp",
  "contact_name": "string",
  "kind": "string",
  "icon_url": "string",
  "mobile": "string",
  "notification_count": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update the current account

PUT
https://api.mytommy.com/v1/me/current_account

Update the current user account. \ The current account may be a User, Team, or TeamMember type.

Parameters

current_account_idinteger<int64>requiredquery

The polymorphic Account ID

current_account_typestringrequiredquery

The polymorphic Account Type (User, Team, TeamMember)

Response

200OKany

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update the current account
curl -X PUT 'https://api.mytommy.com/v1/me/current_account'
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'PUT',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'PUT',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.put('https://api.mytommy.com/v1/me/current_account')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/current_account')
request = Net::HTTP::Put.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/me/current_account", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 111,
  "type": "string",
  "user_id": 0,
  "team_id": 0,
  "name": "Acme Corp",
  "contact_name": "string",
  "kind": "string",
  "icon_url": "string",
  "mobile": "string",
  "notification_count": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

User

Endpoints for the authenticated user profile and settings.

Get the current user object

GET
https://api.mytommy.com/v1/me

Get the current user object.

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get the current user object
curl -X GET 'https://api.mytommy.com/v1/me'
const response = await fetch('https://api.mytommy.com/v1/me', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update the current user object

PUT
https://api.mytommy.com/v1/me

Update the current user object.

Body

application/json

UserInput request

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

photostring<binary>
passwordstring

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update the current user object
curl -X PUT 'https://api.mytommy.com/v1/me' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/me', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "photo": "<binary>",
      "password": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "photo": "<binary>",
      "password": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "photo": "<binary>",
  "password": "string"
}

response = requests.put('https://api.mytommy.com/v1/me', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/me", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "photo": "<binary>",
  "password": "string"
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get all accounts belonging to the current user

GET
https://api.mytommy.com/v1/me/accounts

Get all accounts belonging to the current user.

Response

200OKArray<any>

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all accounts belonging to the current user
curl -X GET 'https://api.mytommy.com/v1/me/accounts'
const response = await fetch('https://api.mytommy.com/v1/me/accounts', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/accounts', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/accounts')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/accounts')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/accounts", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get work-life score chart data for the current user

GET
https://api.mytommy.com/v1/me/wls

Get work-life score chart data for the current user.

Response

200OKobject

WLS chart data

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get work-life score chart data for the current user
curl -X GET 'https://api.mytommy.com/v1/me/wls'
const response = await fetch('https://api.mytommy.com/v1/me/wls', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/wls', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/wls')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/wls')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/wls", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "labels": [
    "string"
  ],
  "values": [
    0
  ],
  "team_values": {},
  "feedback": [
    "string"
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get the current account

GET
https://api.mytommy.com/v1/me/current_account

Get the current user account.

Response

200OKany

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get the current account
curl -X GET 'https://api.mytommy.com/v1/me/current_account'
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/current_account')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/current_account')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/current_account", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 111,
  "type": "string",
  "user_id": 0,
  "team_id": 0,
  "name": "Acme Corp",
  "contact_name": "string",
  "kind": "string",
  "icon_url": "string",
  "mobile": "string",
  "notification_count": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update the current account

PUT
https://api.mytommy.com/v1/me/current_account

Update the current user account. \ The current account may be a User, Team, or TeamMember type.

Parameters

current_account_idinteger<int64>requiredquery

The polymorphic Account ID

current_account_typestringrequiredquery

The polymorphic Account Type (User, Team, TeamMember)

Response

200OKany

Account response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update the current account
curl -X PUT 'https://api.mytommy.com/v1/me/current_account'
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'PUT',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/current_account', {
  method: 'PUT',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.put('https://api.mytommy.com/v1/me/current_account')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/current_account')
request = Net::HTTP::Put.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/me/current_account", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 111,
  "type": "string",
  "user_id": 0,
  "team_id": 0,
  "name": "Acme Corp",
  "contact_name": "string",
  "kind": "string",
  "icon_url": "string",
  "mobile": "string",
  "notification_count": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get user settings

GET
https://api.mytommy.com/v1/me/settings

Get user settings objects.

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get user settings
curl -X GET 'https://api.mytommy.com/v1/me/settings'
const response = await fetch('https://api.mytommy.com/v1/me/settings', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/settings', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/settings')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/settings')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/settings", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get user setting value

GET
https://api.mytommy.com/v1/me/settings/{name}

Get a user setting value.

Parameters

namestringrequiredpath

Setting name

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get user setting value
curl -X GET 'https://api.mytommy.com/v1/me/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/settings/{name}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update user setting value

PUT
https://api.mytommy.com/v1/me/settings/{name}

Update a user setting value.

Body

application/json

SettingData request

dataobjectrequired

Setting data as JSON, boolean, integer or string.

contextstring
_formatstring

Parameters

namestringrequiredpath

Setting name

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update user setting value
curl -X PUT 'https://api.mytommy.com/v1/me/settings/{name}' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {},
    "context": "string",
    "_format": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "data": {},
      "context": "string",
      "_format": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "data": {},
      "context": "string",
      "_format": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "data": {},
  "context": "string",
  "_format": "string"
}

response = requests.put('https://api.mytommy.com/v1/me/settings/{name}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/settings/{name}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "data": {},
    "context": "string",
    "_format": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "data": {},
    "context": "string",
    "_format": "string"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/me/settings/{name}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "data": {},
  "context": "string",
  "_format": "string"
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete user setting value

DELETE
https://api.mytommy.com/v1/me/settings/{name}

Delete a user setting value.

Parameters

namestringrequiredpath

Setting name

Response

204No Content

No content

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete user setting value
curl -X DELETE 'https://api.mytommy.com/v1/me/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/settings/{name}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/me/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/settings/{name}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/me/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a User on the system

POST
https://api.mytommy.com/v1/users

Create a User on the system.

Body

application/json

UserInput request

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

photostring<binary>
passwordstring

Response

200OKobject

User response

201Createdobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a User on the system
curl -X POST 'https://api.mytommy.com/v1/users' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "photo": "<binary>",
      "password": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "photo": "<binary>",
      "password": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "photo": "<binary>",
  "password": "string"
}

response = requests.post('https://api.mytommy.com/v1/users', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "photo": "<binary>",
    "password": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/users", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "photo": "<binary>",
  "password": "string"
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Send a verification SMS

POST
https://api.mytommy.com/v1/users/{id}/send_verification_sms

Send an account verification SMS to the user's mobile number.

Parameters

idinteger<int64>requiredpath

User id

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Send a verification SMS
curl -X POST 'https://api.mytommy.com/v1/users/{id}/send_verification_sms'
const response = await fetch('https://api.mytommy.com/v1/users/{id}/send_verification_sms', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/{id}/send_verification_sms', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/users/{id}/send_verification_sms')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/{id}/send_verification_sms')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/users/{id}/send_verification_sms", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Send a verification email

POST
https://api.mytommy.com/v1/users/{id}/send_verification_email

Send an account verification email to the user's email address.

Parameters

idinteger<int64>requiredpath

User id

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Send a verification email
curl -X POST 'https://api.mytommy.com/v1/users/{id}/send_verification_email'
const response = await fetch('https://api.mytommy.com/v1/users/{id}/send_verification_email', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/{id}/send_verification_email', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/users/{id}/send_verification_email')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/{id}/send_verification_email')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/users/{id}/send_verification_email", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Reset a user password

POST
https://api.mytommy.com/v1/users/reset_password

Reset a user password for the account associated with the provided email address or mobile number.

Parameters

loginstringrequiredquery

The user email address or mobile number

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Reset a user password
curl -X POST 'https://api.mytommy.com/v1/users/reset_password'
const response = await fetch('https://api.mytommy.com/v1/users/reset_password', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/reset_password', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/users/reset_password')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/reset_password')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/users/reset_password", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Login

POST
https://api.mytommy.com/v1/sessions

This method handles users who are \ authenticating with an email or phone, and password combination.

Body

application/json

UserCredentials request

User login credentials

loginstringrequired
passwordstringrequired

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Login
curl -X POST 'https://api.mytommy.com/v1/sessions' \
  -H 'Content-Type: application/json' \
  -d '{
    "login": "string",
    "password": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "login": "string",
      "password": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "login": "string",
      "password": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "login": "string",
  "password": "string"
}

response = requests.post('https://api.mytommy.com/v1/sessions', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/sessions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "login": "string",
    "password": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "login": "string",
    "password": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/sessions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "login": "string",
  "password": "string"
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Logout

DELETE
https://api.mytommy.com/v1/sessions

This method destroys the current user session.

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Logout
curl -X DELETE 'https://api.mytommy.com/v1/sessions'
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/sessions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/sessions')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/sessions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get the current account QR code image

GET
https://api.mytommy.com/v1/me/qr

Get the current account QR code image.

Response

200OK

Image response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

404Not Foundany

Not Found

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get the current account QR code image
curl -X GET 'https://api.mytommy.com/v1/me/qr'
const response = await fetch('https://api.mytommy.com/v1/me/qr', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/qr', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/qr')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/qr')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/qr", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a user

GET
https://api.mytommy.com/v1/users/{id}

Get a user object by slug.

Parameters

idstringrequiredpath

User slug or ID

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a user
curl -X GET 'https://api.mytommy.com/v1/users/{id}'
const response = await fetch('https://api.mytommy.com/v1/users/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/users/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/users/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Search users

GET
https://api.mytommy.com/v1/users/search

Get all users who's mobile number matches the given search term.

Parameters

termstringrequiredquery

Search term used to filter users

Response

200OKArray<object>

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Search users
curl -X GET 'https://api.mytommy.com/v1/users/search'
const response = await fetch('https://api.mytommy.com/v1/users/search', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/search', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/users/search')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/search')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/users/search", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Verify a user account

GET
https://api.mytommy.com/v1/users/verify

Verify a user account using the given pin code.

Parameters

pinstringrequiredquery

Verification PIN code

user_idinteger<int64>query

Optional user identifier to scope the verification lookup

emailstringquery

Optional email used for verification lookup

mobilestringquery

Optional mobile number used for verification lookup

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Verify a user account
curl -X GET 'https://api.mytommy.com/v1/users/verify'
const response = await fetch('https://api.mytommy.com/v1/users/verify', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/users/verify', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/users/verify')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/users/verify')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/users/verify", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Workforce

Scheduling, shifts, attendance, and workforce management.

Get work-life score chart data for the current user

GET
https://api.mytommy.com/v1/me/wls

Get work-life score chart data for the current user.

Response

200OKobject

WLS chart data

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get work-life score chart data for the current user
curl -X GET 'https://api.mytommy.com/v1/me/wls'
const response = await fetch('https://api.mytommy.com/v1/me/wls', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/me/wls', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/me/wls')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/me/wls')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/me/wls", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "labels": [
    "string"
  ],
  "values": [
    0
  ],
  "team_values": {},
  "feedback": [
    "string"
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get account

GET
https://api.mytommy.com/v1/workforce

Get account settings.

Response

200OKobject & any

Workforce response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get account
curl -X GET 'https://api.mytommy.com/v1/workforce'
const response = await fetch('https://api.mytommy.com/v1/workforce', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": true,
  "timeclock_require_photo": true,
  "timeclock_enable_mobile": true,
  "timeclock_enable_web": true,
  "timeclock_enable_kiosk": true,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": true,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": true,
  "event_notifications_enabled": true,
  "data": {},
  "id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update account

PUT
https://api.mytommy.com/v1/workforce

Update account settings.

Body

application/json

WorkforceInput request

Object for updating a Workforce account

namestring

Display name

week_startstringmondayturesdaywednesday
timeclock_require_gpsboolean
timeclock_require_photoboolean
timeclock_enable_mobileboolean
timeclock_enable_webboolean
timeclock_enable_kioskboolean
timesheets_rounding_methodstringnoneupdownnearest
timesheets_rounding_minutesinteger
timesheets_enable_break_roundingboolean
shift_upcoming_notification_minutesinteger

Minutes before shift start to send notification

shift_forgot_clockin_minutesinteger

Minutes after shift start to send forgot clockin notification

shift_forgot_clockout_minutesinteger

Minutes after shift end to send forgot clockout notification

shift_notifications_enabledboolean

Enable/disable shift notifications

event_notifications_enabledboolean

Enable/disable event notifications

dataobject

Arbitrary data storage

Response

200OKobject & any

Workforce response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update account
curl -X PUT 'https://api.mytommy.com/v1/workforce' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example Name",
    "week_start": "monday",
    "timeclock_require_gps": true,
    "timeclock_require_photo": true,
    "timeclock_enable_mobile": true,
    "timeclock_enable_web": true,
    "timeclock_enable_kiosk": true,
    "timesheets_rounding_method": "none",
    "timesheets_rounding_minutes": 0,
    "timesheets_enable_break_rounding": true,
    "shift_upcoming_notification_minutes": 0,
    "shift_forgot_clockin_minutes": 0,
    "shift_forgot_clockout_minutes": 0,
    "shift_notifications_enabled": true,
    "event_notifications_enabled": true,
    "data": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "Example Name",
      "week_start": "monday",
      "timeclock_require_gps": true,
      "timeclock_require_photo": true,
      "timeclock_enable_mobile": true,
      "timeclock_enable_web": true,
      "timeclock_enable_kiosk": true,
      "timesheets_rounding_method": "none",
      "timesheets_rounding_minutes": 0,
      "timesheets_enable_break_rounding": true,
      "shift_upcoming_notification_minutes": 0,
      "shift_forgot_clockin_minutes": 0,
      "shift_forgot_clockout_minutes": 0,
      "shift_notifications_enabled": true,
      "event_notifications_enabled": true,
      "data": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "Example Name",
      "week_start": "monday",
      "timeclock_require_gps": true,
      "timeclock_require_photo": true,
      "timeclock_enable_mobile": true,
      "timeclock_enable_web": true,
      "timeclock_enable_kiosk": true,
      "timesheets_rounding_method": "none",
      "timesheets_rounding_minutes": 0,
      "timesheets_enable_break_rounding": true,
      "shift_upcoming_notification_minutes": 0,
      "shift_forgot_clockin_minutes": 0,
      "shift_forgot_clockout_minutes": 0,
      "shift_notifications_enabled": true,
      "event_notifications_enabled": true,
      "data": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": True,
  "timeclock_require_photo": True,
  "timeclock_enable_mobile": True,
  "timeclock_enable_web": True,
  "timeclock_enable_kiosk": True,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": True,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": True,
  "event_notifications_enabled": True,
  "data": {}
}

response = requests.put('https://api.mytommy.com/v1/workforce', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "name": "Example Name",
    "week_start": "monday",
    "timeclock_require_gps": true,
    "timeclock_require_photo": true,
    "timeclock_enable_mobile": true,
    "timeclock_enable_web": true,
    "timeclock_enable_kiosk": true,
    "timesheets_rounding_method": "none",
    "timesheets_rounding_minutes": 0,
    "timesheets_enable_break_rounding": true,
    "shift_upcoming_notification_minutes": 0,
    "shift_forgot_clockin_minutes": 0,
    "shift_forgot_clockout_minutes": 0,
    "shift_notifications_enabled": true,
    "event_notifications_enabled": true,
    "data": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "name": "Example Name",
    "week_start": "monday",
    "timeclock_require_gps": true,
    "timeclock_require_photo": true,
    "timeclock_enable_mobile": true,
    "timeclock_enable_web": true,
    "timeclock_enable_kiosk": true,
    "timesheets_rounding_method": "none",
    "timesheets_rounding_minutes": 0,
    "timesheets_enable_break_rounding": true,
    "shift_upcoming_notification_minutes": 0,
    "shift_forgot_clockin_minutes": 0,
    "shift_forgot_clockout_minutes": 0,
    "shift_notifications_enabled": true,
    "event_notifications_enabled": true,
    "data": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": true,
  "timeclock_require_photo": true,
  "timeclock_enable_mobile": true,
  "timeclock_enable_web": true,
  "timeclock_enable_kiosk": true,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": true,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": true,
  "event_notifications_enabled": true,
  "data": {}
}
{
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": true,
  "timeclock_require_photo": true,
  "timeclock_enable_mobile": true,
  "timeclock_enable_web": true,
  "timeclock_enable_kiosk": true,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": true,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": true,
  "event_notifications_enabled": true,
  "data": {},
  "id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get employees as manager

GET
https://api.mytommy.com/v1/workforce/manager/employees

Get employees as manager.

Response

200OKArray<object & any>

WorkforceEmployee response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get employees as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/employees'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/employees')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/employees')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/employees", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an employee as manager

GET
https://api.mytommy.com/v1/workforce/manager/employees/{user_id}

Get an employee as manager by ID.

Parameters

user_idstringrequiredpath

Response

200OKobject & any

WorkforceEmployee response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an employee as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/employees/{user_id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/employees/{user_id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an employee

PUT
https://api.mytommy.com/v1/workforce/manager/employees/{user_id}

Update an employee by ID.

Body

application/json

WorkforceEmployeeInput request

Object for updating an employee

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

has_vehicleboolean
compliance_checkstring
notesstring

Parameters

user_idstringrequiredpath

Response

200OKobject & any

WorkforceEmployee response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an employee
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/employees/{user_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "has_vehicle": true,
    "compliance_check": "string",
    "notes": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "has_vehicle": true,
      "compliance_check": "string",
      "notes": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "has_vehicle": true,
      "compliance_check": "string",
      "notes": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "team_id": 0,
  "favorite": True,
  "mute": True,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "has_vehicle": True,
  "compliance_check": "string",
  "notes": "string"
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/employees/{user_id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "has_vehicle": true,
    "compliance_check": "string",
    "notes": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "has_vehicle": true,
    "compliance_check": "string",
    "notes": "string"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/employees/{user_id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "has_vehicle": true,
  "compliance_check": "string",
  "notes": "string"
}
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get availabilities

GET
https://api.mytommy.com/v1/workforce/availabilities

Get availabilities belonging to the current account.

Response

200OKArray<any & any>

WorkforceAvailability response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get availabilities
curl -X GET 'https://api.mytommy.com/v1/workforce/availabilities'
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/availabilities')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/availabilities')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/availabilities", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "am": 0,
    "pm": 0,
    "nd": 0,
    "am_locked": true,
    "pm_locked": true,
    "nd_locked": true,
    "date": "2024-01-15",
    "id": 0,
    "user_id": 0,
    "team_id": 0,
    "employee_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get availability for date

GET
https://api.mytommy.com/v1/workforce/availabilities/{date}

Get a availability for date.

Parameters

datestring<date>requiredpath

Availability date

Response

200OKany & any

WorkforceAvailability response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get availability for date
curl -X GET 'https://api.mytommy.com/v1/workforce/availabilities/{date}'
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities/{date}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities/{date}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/availabilities/{date}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/availabilities/{date}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/availabilities/{date}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": true,
  "pm_locked": true,
  "nd_locked": true,
  "date": "2024-01-15",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "employee_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update availability for date

PUT
https://api.mytommy.com/v1/workforce/availabilities/{date}

Update availability for date.

Body

application/json

WorkforceAvailabilityInput request

Object for updating a availability

aminteger
pminteger
ndinteger
am_lockedboolean
pm_lockedboolean
nd_lockedboolean
datestring<date>

Parameters

datestring<date>requiredpath

Availability date

Response

200OKany & any

WorkforceAvailability response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update availability for date
curl -X PUT 'https://api.mytommy.com/v1/workforce/availabilities/{date}' \
  -H 'Content-Type: application/json' \
  -d '{
    "am": 0,
    "pm": 0,
    "nd": 0,
    "am_locked": true,
    "pm_locked": true,
    "nd_locked": true,
    "date": "2024-01-15"
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities/{date}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "am": 0,
      "pm": 0,
      "nd": 0,
      "am_locked": true,
      "pm_locked": true,
      "nd_locked": true,
      "date": "2024-01-15"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/availabilities/{date}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "am": 0,
      "pm": 0,
      "nd": 0,
      "am_locked": true,
      "pm_locked": true,
      "nd_locked": true,
      "date": "2024-01-15"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": True,
  "pm_locked": True,
  "nd_locked": True,
  "date": "2024-01-15"
}

response = requests.put('https://api.mytommy.com/v1/workforce/availabilities/{date}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/availabilities/{date}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "am": 0,
    "pm": 0,
    "nd": 0,
    "am_locked": true,
    "pm_locked": true,
    "nd_locked": true,
    "date": "2024-01-15"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "am": 0,
    "pm": 0,
    "nd": 0,
    "am_locked": true,
    "pm_locked": true,
    "nd_locked": true,
    "date": "2024-01-15"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/availabilities/{date}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": true,
  "pm_locked": true,
  "nd_locked": true,
  "date": "2024-01-15"
}
{
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": true,
  "pm_locked": true,
  "nd_locked": true,
  "date": "2024-01-15",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "employee_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a shift question

POST
https://api.mytommy.com/v1/workforce/manager/shift_questions

Create a shift question.

Body

application/json

WorkforceShiftQuestion request

Object representing a shift question

team_idinteger<int64>
textstring
offset_minutesinteger<int64>
whenstringalwaysstart_shiftend_shift
alwaysboolean
enabledboolean
tag_idsArray<integer>

Response

201Createdobject

WorkforceShiftQuestion response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a shift question
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/shift_questions' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_id": 0,
    "text": "string",
    "offset_minutes": 0,
    "when": "always",
    "always": true,
    "enabled": true,
    "tag_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_questions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0,
      "text": "string",
      "offset_minutes": 0,
      "when": "always",
      "always": true,
      "enabled": true,
      "tag_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_questions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0,
      "text": "string",
      "offset_minutes": 0,
      "when": "always",
      "always": true,
      "enabled": true,
      "tag_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "team_id": 0,
  "text": "string",
  "offset_minutes": 0,
  "when": "always",
  "always": True,
  "enabled": True,
  "tag_ids": [
    0
  ]
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/shift_questions', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shift_questions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "team_id": 0,
    "text": "string",
    "offset_minutes": 0,
    "when": "always",
    "always": true,
    "enabled": true,
    "tag_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "team_id": 0,
    "text": "string",
    "offset_minutes": 0,
    "when": "always",
    "always": true,
    "enabled": true,
    "tag_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/shift_questions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "team_id": 0,
  "text": "string",
  "offset_minutes": 0,
  "when": "always",
  "always": true,
  "enabled": true,
  "tag_ids": [
    0
  ]
}
{
  "team_id": 0,
  "text": "string",
  "offset_minutes": 0,
  "when": "always",
  "always": true,
  "enabled": true,
  "tag_ids": [
    0
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get shifts

GET
https://api.mytommy.com/v1/workforce/shifts

Get shifts belonging to the current account.

Response

200OKArray<object>

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get shifts
curl -X GET 'https://api.mytommy.com/v1/workforce/shifts'
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/shifts')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shifts')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/shifts", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "team_id": 0,
    "assignee_id": 0,
    "event_id": 0,
    "shift_on_same_day": true,
    "shift_requested": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get active shifts

GET
https://api.mytommy.com/v1/workforce/shifts/active

Get active shifts belonging to the current account.

Response

200OKArray<object>

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get active shifts
curl -X GET 'https://api.mytommy.com/v1/workforce/shifts/active'
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/active', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/active', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/shifts/active')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shifts/active')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/shifts/active", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "team_id": 0,
    "assignee_id": 0,
    "event_id": 0,
    "shift_on_same_day": true,
    "shift_requested": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a shift

GET
https://api.mytommy.com/v1/workforce/shifts/{id}

Get a shift by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShift id

Response

200OKobject

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a shift
curl -X GET 'https://api.mytommy.com/v1/workforce/shifts/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/shifts/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shifts/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/shifts/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get shift questions

GET
https://api.mytommy.com/v1/workforce/shifts/{id}/questions

Get shift questions by shift ID.

Parameters

idinteger<int64>requiredpath

WorkforceShift id

Response

200OKArray<object>

WorkforceShiftQuestion response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get shift questions
curl -X GET 'https://api.mytommy.com/v1/workforce/shifts/{id}/questions'
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}/questions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}/questions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/shifts/{id}/questions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shifts/{id}/questions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/shifts/{id}/questions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "team_id": 0,
    "text": "string",
    "offset_minutes": 0,
    "when": "always",
    "always": true,
    "enabled": true,
    "tag_ids": [
      0
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a shift answer

POST
https://api.mytommy.com/v1/workforce/shifts/{id}/answers

Create a shift answer.

Body

application/json

WorkforceShiftAnswer request

Object representing a shift answer

team_idinteger<int64>
shift_idinteger<int64>
shift_question_idinteger<int64>
attendance_idinteger<int64>
user_idinteger<int64>
textstring

Parameters

idstringrequiredpath

Response

201Createdobject

WorkforceShiftAnswer response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a shift answer
curl -X POST 'https://api.mytommy.com/v1/workforce/shifts/{id}/answers' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_id": 0,
    "shift_id": 0,
    "shift_question_id": 0,
    "attendance_id": 0,
    "user_id": 0,
    "text": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}/answers', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0,
      "shift_id": 0,
      "shift_question_id": 0,
      "attendance_id": 0,
      "user_id": 0,
      "text": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shifts/{id}/answers', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0,
      "shift_id": 0,
      "shift_question_id": 0,
      "attendance_id": 0,
      "user_id": 0,
      "text": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "team_id": 0,
  "shift_id": 0,
  "shift_question_id": 0,
  "attendance_id": 0,
  "user_id": 0,
  "text": "string"
}

response = requests.post('https://api.mytommy.com/v1/workforce/shifts/{id}/answers', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shifts/{id}/answers')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "team_id": 0,
    "shift_id": 0,
    "shift_question_id": 0,
    "attendance_id": 0,
    "user_id": 0,
    "text": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "team_id": 0,
    "shift_id": 0,
    "shift_question_id": 0,
    "attendance_id": 0,
    "user_id": 0,
    "text": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/shifts/{id}/answers", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "team_id": 0,
  "shift_id": 0,
  "shift_question_id": 0,
  "attendance_id": 0,
  "user_id": 0,
  "text": "string"
}
{
  "team_id": 0,
  "shift_id": 0,
  "shift_question_id": 0,
  "attendance_id": 0,
  "user_id": 0,
  "text": "string"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get shifts as manager

GET
https://api.mytommy.com/v1/workforce/manager/shifts

Get shifts as manager.

Response

200OKArray<object>

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get shifts as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/shifts'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/shifts')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shifts')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/shifts", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "team_id": 0,
    "assignee_id": 0,
    "event_id": 0,
    "shift_on_same_day": true,
    "shift_requested": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a shift

POST
https://api.mytommy.com/v1/workforce/manager/shifts

Create a shift.

Body

application/json

WorkforceShiftInput request

Object for updating a shift

titlestring

Human-friendly title

start_atstring<date-time>
end_atstring<date-time>
statusstringopenassignedpublished

Current status

location_idinteger<int64>
location_namestring
rolestring
departmentstring
detailsstring
dataobject

Response

201Createdobject

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a shift
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/shifts' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z",
      "status": "active",
      "location_id": 0,
      "location_name": "string",
      "role": "string",
      "department": "string",
      "details": "string",
      "data": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z",
      "status": "active",
      "location_id": 0,
      "location_name": "string",
      "role": "string",
      "department": "string",
      "details": "string",
      "data": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "title": "Example Title",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "status": "active",
  "location_id": 0,
  "location_name": "string",
  "role": "string",
  "department": "string",
  "details": "string",
  "data": {}
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/shifts', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shifts')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/shifts", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "title": "Example Title",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "status": "active",
  "location_id": 0,
  "location_name": "string",
  "role": "string",
  "department": "string",
  "details": "string",
  "data": {}
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a shift as manager

GET
https://api.mytommy.com/v1/workforce/manager/shifts/{id}

Get a shift as manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShift id

Response

200OKobject

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a shift as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/shifts/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/shifts/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shifts/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/shifts/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a shift as manager

PUT
https://api.mytommy.com/v1/workforce/manager/shifts/{id}

Update a shift as a manager by ID.

Body

application/json

WorkforceShiftInput request

Object for updating a shift

titlestring

Human-friendly title

start_atstring<date-time>
end_atstring<date-time>
statusstringopenassignedpublished

Current status

location_idinteger<int64>
location_namestring
rolestring
departmentstring
detailsstring
dataobject

Parameters

idinteger<int64>requiredpath

WorkforceShift id

Response

200OKobject

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a shift as manager
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/shifts/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z",
      "status": "active",
      "location_id": 0,
      "location_name": "string",
      "role": "string",
      "department": "string",
      "details": "string",
      "data": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z",
      "status": "active",
      "location_id": 0,
      "location_name": "string",
      "role": "string",
      "department": "string",
      "details": "string",
      "data": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "title": "Example Title",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "status": "active",
  "location_id": 0,
  "location_name": "string",
  "role": "string",
  "department": "string",
  "details": "string",
  "data": {}
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shifts/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "title": "Example Title",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "status": "active",
    "location_id": 0,
    "location_name": "string",
    "role": "string",
    "department": "string",
    "details": "string",
    "data": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/shifts/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "title": "Example Title",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "status": "active",
  "location_id": 0,
  "location_name": "string",
  "role": "string",
  "department": "string",
  "details": "string",
  "data": {}
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a shift as manager

DELETE
https://api.mytommy.com/v1/workforce/manager/shifts/{id}

Delete a shift as a manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShift id

Response

200OKobject

WorkforceShift response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a shift as manager
curl -X DELETE 'https://api.mytommy.com/v1/workforce/manager/shifts/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shifts/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/workforce/manager/shifts/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shifts/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/workforce/manager/shifts/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a shift request

POST
https://api.mytommy.com/v1/workforce/shift_requests

Create a shift request.

Response

201Createdobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a shift request
curl -X POST 'https://api.mytommy.com/v1/workforce/shift_requests'
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/workforce/shift_requests')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shift_requests')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/shift_requests", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a shift request

PUT
https://api.mytommy.com/v1/workforce/shift_requests/{id}

Update or update a shift request by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShiftRequest id

Response

200OKobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a shift request
curl -X PUT 'https://api.mytommy.com/v1/workforce/shift_requests/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests/{id}', {
  method: 'PUT',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests/{id}', {
  method: 'PUT',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.put('https://api.mytommy.com/v1/workforce/shift_requests/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shift_requests/{id}')
request = Net::HTTP::Put.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/shift_requests/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a shift request

DELETE
https://api.mytommy.com/v1/workforce/shift_requests/{id}

Delete a shift request by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShiftRequest id

Response

200OKobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a shift request
curl -X DELETE 'https://api.mytommy.com/v1/workforce/shift_requests/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/shift_requests/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/workforce/shift_requests/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/shift_requests/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/workforce/shift_requests/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get shift requests as manager

GET
https://api.mytommy.com/v1/workforce/manager/shift_requests

Get shift request as manager.

Response

200OKArray<object & any>

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get shift requests as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/shift_requests'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/shift_requests')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shift_requests')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/shift_requests", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "user_id": 0,
    "shift_id": 0,
    "status": "active",
    "id": 0,
    "team_id": 0,
    "requestor_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a shift request as manager

POST
https://api.mytommy.com/v1/workforce/manager/shift_requests

Create a shift request as manager.

Body

application/json

WorkforceShiftRequestInput request

Object for updating a shift request

user_idinteger<int64>
shift_idinteger<int64>
statusstringrequestedshortlistedapprovedrejectedcanceled

Current status

Response

201Createdobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a shift request as manager
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/shift_requests' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "shift_id": 0,
      "status": "active"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "shift_id": 0,
      "status": "active"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "shift_id": 0,
  "status": "active"
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/shift_requests', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shift_requests')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/shift_requests", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active"
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a shift request as manager

GET
https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}

Get a shift request as manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceShiftRequest id

Response

200OKobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a shift request as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a shift request as manager

PUT
https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}

Update a shift request as manager by ID.

Body

application/json

WorkforceShiftRequestInput request

Object for updating a shift request

user_idinteger<int64>
shift_idinteger<int64>
statusstringrequestedshortlistedapprovedrejectedcanceled

Current status

Parameters

idinteger<int64>requiredpath

WorkforceShiftRequest id

Response

200OKobject & any

WorkforceShiftRequest response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a shift request as manager
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "shift_id": 0,
      "status": "active"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "shift_id": 0,
      "status": "active"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "shift_id": 0,
  "status": "active"
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "shift_id": 0,
    "status": "active"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/shift_requests/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active"
}
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get timesheets

GET
https://api.mytommy.com/v1/workforce/timesheets

Get timesheets belonging to the current account.

Response

200OKArray<object & any>

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get timesheets
curl -X GET 'https://api.mytommy.com/v1/workforce/timesheets'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/timesheets')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheets')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/timesheets", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "id": 0,
    "user_id": 0,
    "team_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a timesheet

GET
https://api.mytommy.com/v1/workforce/timesheets/{id}

Get a timesheet by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheet id

Response

200OKobject & any

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a timesheet
curl -X GET 'https://api.mytommy.com/v1/workforce/timesheets/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/timesheets/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheets/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/timesheets/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an timesheet

PUT
https://api.mytommy.com/v1/workforce/timesheets/{id}

Update an timesheet by ID.

Body

application/json

WorkforceTimesheetInput request

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean

Parameters

idinteger<int64>requiredpath

WorkforceTimesheet id

Response

200OKobject & any

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an timesheet
curl -X PUT 'https://api.mytommy.com/v1/workforce/timesheets/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": True
}

response = requests.put('https://api.mytommy.com/v1/workforce/timesheets/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheets/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/timesheets/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true
}
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a timesheet

DELETE
https://api.mytommy.com/v1/workforce/timesheets/{id}

Delete a timesheet by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

204No Content

Null response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a timesheet
curl -X DELETE 'https://api.mytommy.com/v1/workforce/timesheets/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheets/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/workforce/timesheets/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheets/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/workforce/timesheets/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get timesheets as manager

GET
https://api.mytommy.com/v1/workforce/manager/timesheets

Get timesheets as manager.

Response

200OKArray<object & any>

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get timesheets as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/timesheets'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/timesheets')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheets')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/timesheets", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "id": 0,
    "user_id": 0,
    "team_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a timesheet as manager

POST
https://api.mytommy.com/v1/workforce/manager/timesheets

Create a timesheet as manager.

Body

application/json

WorkforceTimesheetInput request

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean

Response

201Createdobject & any

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a timesheet as manager
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/timesheets' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": True
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/timesheets', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheets')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/timesheets", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true
}
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a timesheet

GET
https://api.mytommy.com/v1/workforce/manager/timesheets/{id}

Get a timesheet as manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheet id

Response

200OKobject & any

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a timesheet
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/timesheets/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/timesheets/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an timesheet

PUT
https://api.mytommy.com/v1/workforce/manager/timesheets/{id}

Update an timesheet as manager by ID.

Body

application/json

WorkforceTimesheetInput request

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean

Parameters

idinteger<int64>requiredpath

WorkforceTimesheet id

Response

200OKobject & any

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an timesheet
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/timesheets/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": True
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheets/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/timesheets/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true
}
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Bulk update timesheets as manager

PUT
https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update

Bulk update timesheets as manager by an array of IDs.

Body

application/json

WorkforceTimesheetBulkInput request

Object for bulk updating a timesheets

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean
timesheet_idsArray<integer>

Response

200OKArray<object & any>

WorkforceTimesheet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Bulk update timesheets as manager
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "timesheet_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true,
      "timesheet_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "status": "active",
      "resource_id": 0,
      "resource_type": "string",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "manual": true,
      "timesheet_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": True,
  "timesheet_ids": [
    0
  ]
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "timesheet_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "timesheet_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/timesheets/bulk_update", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "timesheet_ids": [
    0
  ]
}
[
  {
    "status": "active",
    "resource_id": 0,
    "resource_type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "manual": true,
    "id": 0,
    "user_id": 0,
    "team_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get timesheet items

GET
https://api.mytommy.com/v1/workforce/timesheet_items

Get timesheet items for the current account.

Response

200OKArray<object & any>

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get timesheet items
curl -X GET 'https://api.mytommy.com/v1/workforce/timesheet_items'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/timesheet_items')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheet_items')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/timesheet_items", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true,
    "id": 0,
    "user_id": 0,
    "team_id": 0,
    "active": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a timesheet item

POST
https://api.mytommy.com/v1/workforce/timesheet_items

Create a timesheet item.

Body

application/json

WorkforceTimesheetItemInput request

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean

Response

201Createdobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a timesheet item
curl -X POST 'https://api.mytommy.com/v1/workforce/timesheet_items' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": True
}

response = requests.post('https://api.mytommy.com/v1/workforce/timesheet_items', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheet_items')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/timesheet_items", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a timesheet item

GET
https://api.mytommy.com/v1/workforce/timesheet_items/{id}

Get a timesheet item by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

200OKobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a timesheet item
curl -X GET 'https://api.mytommy.com/v1/workforce/timesheet_items/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/timesheet_items/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheet_items/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/timesheet_items/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a timesheet item

PUT
https://api.mytommy.com/v1/workforce/timesheet_items/{id}

Update a timesheet item by ID.

Body

application/json

WorkforceTimesheetItemInput request

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

200OKobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a timesheet item
curl -X PUT 'https://api.mytommy.com/v1/workforce/timesheet_items/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": True
}

response = requests.put('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheet_items/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/timesheet_items/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a timesheet item

DELETE
https://api.mytommy.com/v1/workforce/timesheet_items/{id}

Delete a timesheet item by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

204No Content

Null response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a timesheet item
curl -X DELETE 'https://api.mytommy.com/v1/workforce/timesheet_items/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/timesheet_items/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/workforce/timesheet_items/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/timesheet_items/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/workforce/timesheet_items/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get timesheet items

GET
https://api.mytommy.com/v1/workforce/manager/timesheet_items

Get timesheet items belonging to the current account.

Response

200OKArray<object & any>

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get timesheet items
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/timesheet_items'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/timesheet_items')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheet_items')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/timesheet_items", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true,
    "id": 0,
    "user_id": 0,
    "team_id": 0,
    "active": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a timesheet item

POST
https://api.mytommy.com/v1/workforce/manager/timesheet_items

Create a timesheet item.

Body

application/json

WorkforceTimesheetItemInput request

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean

Response

201Createdobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a timesheet item
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/timesheet_items' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": True
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/timesheet_items', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheet_items')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/timesheet_items", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a timesheet item as manager

GET
https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}

Get a timesheet item as manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

200OKobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a timesheet item as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a timesheet item as manager

PUT
https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}

Update a timesheet item as manager by ID.

Body

application/json

WorkforceTimesheetItemInput request

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean

Parameters

idinteger<int64>requiredpath

WorkforceTimesheetItem id

Response

200OKobject & any

WorkforceTimesheetItem response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a timesheet item as manager
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "shift_id": 0,
      "timesheet_id": 0,
      "work_hours": 0,
      "break_hours": 0,
      "address": "string",
      "manual": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": True
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "shift_id": 0,
    "timesheet_id": 0,
    "work_hours": 0,
    "break_hours": 0,
    "address": "string",
    "manual": true
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/timesheet_items/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true
}
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get attendances

GET
https://api.mytommy.com/v1/workforce/attendances

Get attendances for the current account.

Response

200OKArray<object & any>

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get attendances
curl -X GET 'https://api.mytommy.com/v1/workforce/attendances'
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/attendances')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/attendances')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/attendances", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {},
    "id": 0,
    "user_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create an attendance

POST
https://api.mytommy.com/v1/workforce/attendances

Create an attendance.

Body

application/json

WorkforceAttendanceInput request

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject

Response

201Createdobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create an attendance
curl -X POST 'https://api.mytommy.com/v1/workforce/attendances' \
  -H 'Content-Type: application/json' \
  -d '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}

response = requests.post('https://api.mytommy.com/v1/workforce/attendances', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/attendances')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/attendances", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get active attendances

GET
https://api.mytommy.com/v1/workforce/attendances/active

Get active attendance for the current account.

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get active attendances
curl -X GET 'https://api.mytommy.com/v1/workforce/attendances/active'
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/active', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/active', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/attendances/active')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/attendances/active')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/attendances/active", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an attendance

GET
https://api.mytommy.com/v1/workforce/attendances/{id}

Get an attendance by ID.

Parameters

idinteger<int64>requiredpath

WorkforceAttendance id

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an attendance
curl -X GET 'https://api.mytommy.com/v1/workforce/attendances/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/attendances/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/attendances/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/attendances/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an attendance

PUT
https://api.mytommy.com/v1/workforce/attendances/{id}

Update an attendance by ID.

Body

application/json

WorkforceAttendanceInput request

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject

Parameters

idinteger<int64>requiredpath

WorkforceAttendance id

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an attendance
curl -X PUT 'https://api.mytommy.com/v1/workforce/attendances/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/attendances/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}

response = requests.put('https://api.mytommy.com/v1/workforce/attendances/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/attendances/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/attendances/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get attendances

GET
https://api.mytommy.com/v1/workforce/manager/attendances

Get attendances belonging to the current account.

Response

200OKArray<object & any>

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get attendances
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/attendances'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/attendances')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/attendances')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/attendances", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {},
    "id": 0,
    "user_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create an attendance

POST
https://api.mytommy.com/v1/workforce/manager/attendances

Create an attendance.

Body

application/json

WorkforceAttendanceInput request

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject

Response

201Createdobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create an attendance
curl -X POST 'https://api.mytommy.com/v1/workforce/manager/attendances' \
  -H 'Content-Type: application/json' \
  -d '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}

response = requests.post('https://api.mytommy.com/v1/workforce/manager/attendances', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/attendances')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/workforce/manager/attendances", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get active attendances as manager

GET
https://api.mytommy.com/v1/workforce/manager/attendances/active

Get active attendances as manager.

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get active attendances as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/attendances/active'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/active', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/active', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/attendances/active')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/attendances/active')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/attendances/active", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an attendance as manager

GET
https://api.mytommy.com/v1/workforce/manager/attendances/{id}

Get an attendance as manager by ID.

Parameters

idinteger<int64>requiredpath

WorkforceAttendance id

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an attendance as manager
curl -X GET 'https://api.mytommy.com/v1/workforce/manager/attendances/{id}'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/workforce/manager/attendances/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/attendances/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/workforce/manager/attendances/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an attendance as manager

PUT
https://api.mytommy.com/v1/workforce/manager/attendances/{id}

Update an attendance as manager by ID.

Body

application/json

WorkforceAttendanceInput request

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject

Parameters

idinteger<int64>requiredpath

WorkforceAttendance id

Response

200OKobject & any

WorkforceAttendance response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an attendance as manager
curl -X PUT 'https://api.mytommy.com/v1/workforce/manager/attendances/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/workforce/manager/attendances/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event_id": 0,
      "latitude": 0,
      "longitude": 0,
      "accuracy": 0,
      "status": "active",
      "address": "string",
      "location_name": "string",
      "image": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}

response = requests.put('https://api.mytommy.com/v1/workforce/manager/attendances/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/workforce/manager/attendances/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "event_id": 0,
    "latitude": 0,
    "longitude": 0,
    "accuracy": 0,
    "status": "active",
    "address": "string",
    "location_name": "string",
    "image": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/workforce/manager/attendances/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Contact

Manage contacts: invite, accept, and share connections.

Get contacts

GET
https://api.mytommy.com/v1/contacts

Get all contacts belonging to the current account.

Response

200OKArray<object & any>

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get contacts
curl -X GET 'https://api.mytommy.com/v1/contacts'
const response = await fetch('https://api.mytommy.com/v1/contacts', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/contacts')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/contacts", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create contact

POST
https://api.mytommy.com/v1/contacts

Create a contact for a user that may not already exist on Tommy. The created user will be invited to join the current user or team.

Body

application/json

ContactRequest request

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

team_idsArray<integer>
viastring

Response

201Createdobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create contact
curl -X POST 'https://api.mytommy.com/v1/contacts' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "team_ids": [
      0
    ],
    "via": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/contacts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "team_ids": [
        0
      ],
      "via": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png",
      "team_ids": [
        0
      ],
      "via": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "team_ids": [
    0
  ],
  "via": "string"
}

response = requests.post('https://api.mytommy.com/v1/contacts', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "team_ids": [
      0
    ],
    "via": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png",
    "team_ids": [
      0
    ],
    "via": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "team_ids": [
    0
  ],
  "via": "string"
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a contact

GET
https://api.mytommy.com/v1/contacts/{friend_id}

Get a contact object by friend user ID.

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

200OKobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a contact
curl -X GET 'https://api.mytommy.com/v1/contacts/{friend_id}'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/contacts/{friend_id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/contacts/{friend_id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a contact

PUT
https://api.mytommy.com/v1/contacts/{friend_id}

Update a single contact object.

Body

application/json

Contact request

A representation of a Contact

friend_idinteger<int64>required

Friend user ID

favoriteboolean
muteboolean
personalboolean
rolesArray<string>

Array of roles assigned to the Contact

locationsArray<string>

Array of locations assigned to the Contact

tagsArray<string>

Array of tags assigned to the Contact

idinteger<int64>
typestring
first_namestring
last_namestring
icon_urlstring
emailstring
mobilestring
statusstring
memberboolean

True when the friend has signed up to Tommy

last_online_atstring<date-time>

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

200OKobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a contact
curl -X PUT 'https://api.mytommy.com/v1/contacts/{friend_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  }'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "friend_id": 0,
      "favorite": true,
      "mute": true,
      "personal": true,
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "type": "string",
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "email": "string",
      "mobile": "string",
      "status": "string",
      "member": true,
      "last_online_at": "2024-01-15T09:30:00Z"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "friend_id": 0,
      "favorite": true,
      "mute": true,
      "personal": true,
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "type": "string",
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "email": "string",
      "mobile": "string",
      "status": "string",
      "member": true,
      "last_online_at": "2024-01-15T09:30:00Z"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "friend_id": 0,
  "favorite": True,
  "mute": True,
  "personal": True,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": True,
  "last_online_at": "2024-01-15T09:30:00Z"
}

response = requests.put('https://api.mytommy.com/v1/contacts/{friend_id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/contacts/{friend_id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Import bulk contacts

POST
https://api.mytommy.com/v1/contacts/import

Import bulk contacts from a mobile phone or other device. Imported contacts must provide first_name and mobile or email parameters.

Body

application/json

Users request

Array<object>
Show child attributes
idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

Response

201CreatedArray<object & any>

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Import bulk contacts
curl -X POST 'https://api.mytommy.com/v1/contacts/import' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png"
    }
  ]'
const response = await fetch('https://api.mytommy.com/v1/contacts/import', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify([
      {
        "id": 12345,
        "status": "active",
        "first_name": "Alex",
        "last_name": "Johnson",
        "slug": "alex-johnson",
        "email": "alex@example.com",
        "mobile": "+15551234567",
        "dob": "1990-01-01T00:00:00.000Z",
        "locale": "en-US",
        "icon_url": "https://cdn.example.com/avatars/12345.png"
      }
    ]),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/import', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify([
      {
        "id": 12345,
        "status": "active",
        "first_name": "Alex",
        "last_name": "Johnson",
        "slug": "alex-johnson",
        "email": "alex@example.com",
        "mobile": "+15551234567",
        "dob": "1990-01-01T00:00:00.000Z",
        "locale": "en-US",
        "icon_url": "https://cdn.example.com/avatars/12345.png"
      }
    ]),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = [
  {
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png"
  }
]

response = requests.post('https://api.mytommy.com/v1/contacts/import', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/import')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '[
    {
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png"
    }
  ]'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`[
    {
      "id": 12345,
      "status": "active",
      "first_name": "Alex",
      "last_name": "Johnson",
      "slug": "alex-johnson",
      "email": "alex@example.com",
      "mobile": "+15551234567",
      "dob": "1990-01-01T00:00:00.000Z",
      "locale": "en-US",
      "icon_url": "https://cdn.example.com/avatars/12345.png"
    }
  ]`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts/import", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
[
  {
    "id": 12345,
    "status": "active",
    "first_name": "Alex",
    "last_name": "Johnson",
    "slug": "alex-johnson",
    "email": "alex@example.com",
    "mobile": "+15551234567",
    "dob": "1990-01-01T00:00:00.000Z",
    "locale": "en-US",
    "icon_url": "https://cdn.example.com/avatars/12345.png"
  }
]
[
  {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Send contact request

POST
https://api.mytommy.com/v1/contacts/{friend_id}/add

Send a contact request to join the given user or team.

Body

application/json

TeamID request

team_idinteger<int64>

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

201Createdobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Send contact request
curl -X POST 'https://api.mytommy.com/v1/contacts/{friend_id}/add' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_id": 0
  }'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/add', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/add', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_id": 0
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "team_id": 0
}

response = requests.post('https://api.mytommy.com/v1/contacts/{friend_id}/add', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}/add')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "team_id": 0
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "team_id": 0
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts/{friend_id}/add", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "team_id": 0
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Invite contact

POST
https://api.mytommy.com/v1/contacts/{friend_id}/invite

Invite the given user to become a contact of the current user or team.

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

201Createdobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Invite contact
curl -X POST 'https://api.mytommy.com/v1/contacts/{friend_id}/invite'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/invite', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/invite', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/contacts/{friend_id}/invite')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}/invite')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts/{friend_id}/invite", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Accept contact request

POST
https://api.mytommy.com/v1/contacts/{friend_id}/accept

Accept an incoming contact request from the given user.

Body

application/json

TeamIDs request

team_idsArray<integer>

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

200OKobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Accept contact request
curl -X POST 'https://api.mytommy.com/v1/contacts/{friend_id}/accept' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/accept', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/accept', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "team_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "team_ids": [
    0
  ]
}

response = requests.post('https://api.mytommy.com/v1/contacts/{friend_id}/accept', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}/accept')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "team_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "team_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts/{friend_id}/accept", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "team_ids": [
    0
  ]
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Reject contact request

POST
https://api.mytommy.com/v1/contacts/{friend_id}/decline

Reject an incoming contact request from the given user.

Parameters

friend_idinteger<int64>requiredpath

User friend_id

Response

200OKobject & any

Contact response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Reject contact request
curl -X POST 'https://api.mytommy.com/v1/contacts/{friend_id}/decline'
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/decline', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/contacts/{friend_id}/decline', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/contacts/{friend_id}/decline')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/contacts/{friend_id}/decline')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/contacts/{friend_id}/decline", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Team

Team resources, members, and related operations.

Create a team

POST
https://api.mytommy.com/v1/teams

Create a team.

Response

201Createdobject

Team response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a team
curl -X POST 'https://api.mytommy.com/v1/teams'
const response = await fetch('https://api.mytommy.com/v1/teams', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/teams', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/teams')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/teams')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/teams", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get the current team object

GET
https://api.mytommy.com/v1/team

Get the current team object.

Response

200OKobject

Team response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get the current team object
curl -X GET 'https://api.mytommy.com/v1/team'
const response = await fetch('https://api.mytommy.com/v1/team', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/team')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/team", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update the current team object

PUT
https://api.mytommy.com/v1/team

Update the current team object.

Body

application/json

TeamInput request

A representation of a Team

idinteger<int64>required

Unique team identifier

user_idinteger<int64>required

Owner user ID

namestringrequired

Team display name

photostring<binary>
icon_urlstring

Team icon URL

emailstring
phonestring
statusstring

Current status

slugstring
featuresobject

Feature flags enabled for the team

Show child attributes
complianceboolean
timesheetsboolean
timeclockboolean
availabilityboolean
ordersboolean
clientsboolean
trainingboolean
leaveboolean
documentsboolean
schedulingboolean
ndisboolean
experimentalboolean
mileageboolean

Response

200OKobject

Team response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update the current team object
curl -X PUT 'https://api.mytommy.com/v1/team' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 9876,
    "user_id": 12345,
    "name": "Operations",
    "photo": "<binary>",
    "icon_url": "https://cdn.example.com/teams/ops.png",
    "email": "string",
    "phone": "string",
    "status": "active",
    "slug": "string",
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }'
const response = await fetch('https://api.mytommy.com/v1/team', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 9876,
      "user_id": 12345,
      "name": "Operations",
      "photo": "<binary>",
      "icon_url": "https://cdn.example.com/teams/ops.png",
      "email": "string",
      "phone": "string",
      "status": "active",
      "slug": "string",
      "features": {
        "compliance": true,
        "timesheets": true,
        "timeclock": true,
        "availability": true,
        "orders": true,
        "clients": true,
        "training": true,
        "leave": true,
        "documents": true,
        "scheduling": true,
        "ndis": true,
        "experimental": true,
        "mileage": true
      }
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 9876,
      "user_id": 12345,
      "name": "Operations",
      "photo": "<binary>",
      "icon_url": "https://cdn.example.com/teams/ops.png",
      "email": "string",
      "phone": "string",
      "status": "active",
      "slug": "string",
      "features": {
        "compliance": true,
        "timesheets": true,
        "timeclock": true,
        "availability": true,
        "orders": true,
        "clients": true,
        "training": true,
        "leave": true,
        "documents": true,
        "scheduling": true,
        "ndis": true,
        "experimental": true,
        "mileage": true
      }
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": True,
    "timesheets": True,
    "timeclock": True,
    "availability": True,
    "orders": True,
    "clients": True,
    "training": True,
    "leave": True,
    "documents": True,
    "scheduling": True,
    "ndis": True,
    "experimental": True,
    "mileage": True
  }
}

response = requests.put('https://api.mytommy.com/v1/team', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 9876,
    "user_id": 12345,
    "name": "Operations",
    "photo": "<binary>",
    "icon_url": "https://cdn.example.com/teams/ops.png",
    "email": "string",
    "phone": "string",
    "status": "active",
    "slug": "string",
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 9876,
    "user_id": 12345,
    "name": "Operations",
    "photo": "<binary>",
    "icon_url": "https://cdn.example.com/teams/ops.png",
    "email": "string",
    "phone": "string",
    "status": "active",
    "slug": "string",
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/team", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get team settings

GET
https://api.mytommy.com/v1/team/settings

Get team settings objects.

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get team settings
curl -X GET 'https://api.mytommy.com/v1/team/settings'
const response = await fetch('https://api.mytommy.com/v1/team/settings', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/settings', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/team/settings')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/settings')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/team/settings", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update team features

PATCH
https://api.mytommy.com/v1/team/features

Bulk update team feature flags. Unknown keys are ignored.

Body

application/json
featuresobject

Feature flags enabled for the team

Show child attributes
complianceboolean
timesheetsboolean
timeclockboolean
availabilityboolean
ordersboolean
clientsboolean
trainingboolean
leaveboolean
documentsboolean
schedulingboolean
ndisboolean
experimentalboolean
mileageboolean

Response

200OKobject

Updated team features

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update team features
curl -X PATCH 'https://api.mytommy.com/v1/team/features' \
  -H 'Content-Type: application/json' \
  -d '{
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }'
const response = await fetch('https://api.mytommy.com/v1/team/features', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "features": {
        "compliance": true,
        "timesheets": true,
        "timeclock": true,
        "availability": true,
        "orders": true,
        "clients": true,
        "training": true,
        "leave": true,
        "documents": true,
        "scheduling": true,
        "ndis": true,
        "experimental": true,
        "mileage": true
      }
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/features', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "features": {
        "compliance": true,
        "timesheets": true,
        "timeclock": true,
        "availability": true,
        "orders": true,
        "clients": true,
        "training": true,
        "leave": true,
        "documents": true,
        "scheduling": true,
        "ndis": true,
        "experimental": true,
        "mileage": true
      }
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "features": {
    "compliance": True,
    "timesheets": True,
    "timeclock": True,
    "availability": True,
    "orders": True,
    "clients": True,
    "training": True,
    "leave": True,
    "documents": True,
    "scheduling": True,
    "ndis": True,
    "experimental": True,
    "mileage": True
  }
}

response = requests.patch('https://api.mytommy.com/v1/team/features', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/features')
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "features": {
      "compliance": true,
      "timesheets": true,
      "timeclock": true,
      "availability": true,
      "orders": true,
      "clients": true,
      "training": true,
      "leave": true,
      "documents": true,
      "scheduling": true,
      "ndis": true,
      "experimental": true,
      "mileage": true
    }
  }`)
  req, _ := http.NewRequest("PATCH", "https://api.mytommy.com/v1/team/features", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get team setting value

GET
https://api.mytommy.com/v1/team/settings/{name}

Get a team setting value.

Parameters

namestringrequiredpath

Setting name

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get team setting value
curl -X GET 'https://api.mytommy.com/v1/team/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/team/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/settings/{name}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/team/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update team setting value

PUT
https://api.mytommy.com/v1/team/settings/{name}

Update a team setting value.

Body

application/json

SettingData request

dataobjectrequired

Setting data as JSON, boolean, integer or string.

contextstring
_formatstring

Parameters

namestringrequiredpath

Setting name

Response

200OKobject

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update team setting value
curl -X PUT 'https://api.mytommy.com/v1/team/settings/{name}' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {},
    "context": "string",
    "_format": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "data": {},
      "context": "string",
      "_format": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "data": {},
      "context": "string",
      "_format": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "data": {},
  "context": "string",
  "_format": "string"
}

response = requests.put('https://api.mytommy.com/v1/team/settings/{name}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/settings/{name}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "data": {},
    "context": "string",
    "_format": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "data": {},
    "context": "string",
    "_format": "string"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/team/settings/{name}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "data": {},
  "context": "string",
  "_format": "string"
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete team setting value

DELETE
https://api.mytommy.com/v1/team/settings/{name}

Delete a team setting value.

Parameters

namestringrequiredpath

Setting name

Response

204No Content

No content

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete team setting value
curl -X DELETE 'https://api.mytommy.com/v1/team/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/settings/{name}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/team/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/settings/{name}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/team/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Apply demo data

POST
https://api.mytommy.com/v1/team/demo_data/apply

Apply industry-specific demo data to the current team.

Body

application/json

Demo data application parameters

seed_typestringworkforceaged_carehospitalitynursingpartnerretailconstructionload_testing

The type of demo data to apply

optionsobject

Optional parameters to customize the demo data generation

Show child attributes
number_of_team_membersinteger

Number of team members to create

number_of_locationsinteger

Number of locations to create

number_of_pay_templatesinteger

Number of pay templates to create

number_of_shiftsinteger

Number of shifts to create

number_of_timesheetsinteger

Number of timesheets to create

total_team_membersinteger

Total team members for load testing

locations_countinteger

Number of locations for load testing

pay_templates_countinteger

Number of pay templates for load testing

chats_countinteger

Number of chats for load testing

leave_requests_countinteger

Number of leave requests for load testing

shifts_per_member_per_weekinteger

Shifts per member per week for load testing

weeks_backinteger

Weeks back for load testing

weeks_forwardinteger

Weeks forward for load testing

attendance_ratenumber<float>

Attendance rate for load testing (0.0 to 1.0)

Response

200OKobject

Demo data sync started successfully

400Bad Request

Invalid seed type

401Unauthorizedany

Unauthorized

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Apply demo data
curl -X POST 'https://api.mytommy.com/v1/team/demo_data/apply' \
  -H 'Content-Type: application/json' \
  -d '{
    "seed_type": "workforce",
    "options": {
      "number_of_team_members": 0,
      "number_of_locations": 0,
      "number_of_pay_templates": 0,
      "number_of_shifts": 0,
      "number_of_timesheets": 0,
      "total_team_members": 0,
      "locations_count": 0,
      "pay_templates_count": 0,
      "chats_count": 0,
      "leave_requests_count": 0,
      "shifts_per_member_per_week": 0,
      "weeks_back": 0,
      "weeks_forward": 0,
      "attendance_rate": 0
    }
  }'
const response = await fetch('https://api.mytommy.com/v1/team/demo_data/apply', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "seed_type": "workforce",
      "options": {
        "number_of_team_members": 0,
        "number_of_locations": 0,
        "number_of_pay_templates": 0,
        "number_of_shifts": 0,
        "number_of_timesheets": 0,
        "total_team_members": 0,
        "locations_count": 0,
        "pay_templates_count": 0,
        "chats_count": 0,
        "leave_requests_count": 0,
        "shifts_per_member_per_week": 0,
        "weeks_back": 0,
        "weeks_forward": 0,
        "attendance_rate": 0
      }
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/demo_data/apply', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "seed_type": "workforce",
      "options": {
        "number_of_team_members": 0,
        "number_of_locations": 0,
        "number_of_pay_templates": 0,
        "number_of_shifts": 0,
        "number_of_timesheets": 0,
        "total_team_members": 0,
        "locations_count": 0,
        "pay_templates_count": 0,
        "chats_count": 0,
        "leave_requests_count": 0,
        "shifts_per_member_per_week": 0,
        "weeks_back": 0,
        "weeks_forward": 0,
        "attendance_rate": 0
      }
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "seed_type": "workforce",
  "options": {
    "number_of_team_members": 0,
    "number_of_locations": 0,
    "number_of_pay_templates": 0,
    "number_of_shifts": 0,
    "number_of_timesheets": 0,
    "total_team_members": 0,
    "locations_count": 0,
    "pay_templates_count": 0,
    "chats_count": 0,
    "leave_requests_count": 0,
    "shifts_per_member_per_week": 0,
    "weeks_back": 0,
    "weeks_forward": 0,
    "attendance_rate": 0
  }
}

response = requests.post('https://api.mytommy.com/v1/team/demo_data/apply', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/demo_data/apply')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "seed_type": "workforce",
    "options": {
      "number_of_team_members": 0,
      "number_of_locations": 0,
      "number_of_pay_templates": 0,
      "number_of_shifts": 0,
      "number_of_timesheets": 0,
      "total_team_members": 0,
      "locations_count": 0,
      "pay_templates_count": 0,
      "chats_count": 0,
      "leave_requests_count": 0,
      "shifts_per_member_per_week": 0,
      "weeks_back": 0,
      "weeks_forward": 0,
      "attendance_rate": 0
    }
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "seed_type": "workforce",
    "options": {
      "number_of_team_members": 0,
      "number_of_locations": 0,
      "number_of_pay_templates": 0,
      "number_of_shifts": 0,
      "number_of_timesheets": 0,
      "total_team_members": 0,
      "locations_count": 0,
      "pay_templates_count": 0,
      "chats_count": 0,
      "leave_requests_count": 0,
      "shifts_per_member_per_week": 0,
      "weeks_back": 0,
      "weeks_forward": 0,
      "attendance_rate": 0
    }
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/team/demo_data/apply", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "seed_type": "workforce",
  "options": {
    "number_of_team_members": 0,
    "number_of_locations": 0,
    "number_of_pay_templates": 0,
    "number_of_shifts": 0,
    "number_of_timesheets": 0,
    "total_team_members": 0,
    "locations_count": 0,
    "pay_templates_count": 0,
    "chats_count": 0,
    "leave_requests_count": 0,
    "shifts_per_member_per_week": 0,
    "weeks_back": 0,
    "weeks_forward": 0,
    "attendance_rate": 0
  }
}
{
  "success": true,
  "message": "string",
  "sync_id": 0,
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Reset demo data

DELETE
https://api.mytommy.com/v1/team/demo_data/reset

Remove all generated demo data from the current team.

Response

200OKobject

Demo data reset successfully

401Unauthorizedany

Unauthorized

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Reset demo data
curl -X DELETE 'https://api.mytommy.com/v1/team/demo_data/reset'
const response = await fetch('https://api.mytommy.com/v1/team/demo_data/reset', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/demo_data/reset', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/team/demo_data/reset')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/demo_data/reset')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/team/demo_data/reset", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "success": true,
  "message": "string",
  "team_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get all members belonging to the current team

GET
https://api.mytommy.com/v1/team/members

Get all members belonging to the current team.

Response

200OKArray<object & any>

TeamMember response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all members belonging to the current team
curl -X GET 'https://api.mytommy.com/v1/team/members'
const response = await fetch('https://api.mytommy.com/v1/team/members', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/members', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/team/members')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/members')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/team/members", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a team member

GET
https://api.mytommy.com/v1/team/members/{user_id}

Get a single team member object by it's corresponding user ID.

Parameters

user_idinteger<int64>requiredpath

User user_id

Response

200OKobject & any

TeamMember response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a team member
curl -X GET 'https://api.mytommy.com/v1/team/members/{user_id}'
const response = await fetch('https://api.mytommy.com/v1/team/members/{user_id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/members/{user_id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/team/members/{user_id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/members/{user_id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/team/members/{user_id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a team member

PUT
https://api.mytommy.com/v1/team/members/{user_id}

Update a single team member object.

Body

application/json

TeamMember request

Object that represents a Team Member

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
first_namestring
last_namestring
emailstring
mobilestring
managerboolean
memberboolean

True when the team member has signed up to Tommy

statusstring
icon_urlstring
addon_linksArray<any>

Array of profile links accessible by the current User on the Team Member profile

Show child attributes
titlestring

Human-friendly title

packagestring
urlstring
icon_urlstring

Parameters

user_idinteger<int64>requiredpath

User user_id

Response

200OKobject & any

TeamMember response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a team member
curl -X PUT 'https://api.mytommy.com/v1/team/members/{user_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/team/members/{user_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "mobile": "string",
      "manager": true,
      "member": true,
      "status": "string",
      "icon_url": "string",
      "addon_links": [
        {
          "title": "Example Title",
          "package": "string",
          "url": "string",
          "icon_url": "string"
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/members/{user_id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "mobile": "string",
      "manager": true,
      "member": true,
      "status": "string",
      "icon_url": "string",
      "addon_links": [
        {
          "title": "Example Title",
          "package": "string",
          "url": "string",
          "icon_url": "string"
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "team_id": 0,
  "favorite": True,
  "mute": True,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": True,
  "member": True,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}

response = requests.put('https://api.mytommy.com/v1/team/members/{user_id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/members/{user_id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/team/members/{user_id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Invite team member

POST
https://api.mytommy.com/v1/team/members/invite

Invite a member to the current team.

Body

application/json

TeamMember request

Object that represents a Team Member

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
first_namestring
last_namestring
emailstring
mobilestring
managerboolean
memberboolean

True when the team member has signed up to Tommy

statusstring
icon_urlstring
addon_linksArray<any>

Array of profile links accessible by the current User on the Team Member profile

Show child attributes
titlestring

Human-friendly title

packagestring
urlstring
icon_urlstring

Response

200OKobject & any

TeamMember response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Invite team member
curl -X POST 'https://api.mytommy.com/v1/team/members/invite' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/team/members/invite', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "mobile": "string",
      "manager": true,
      "member": true,
      "status": "string",
      "icon_url": "string",
      "addon_links": [
        {
          "title": "Example Title",
          "package": "string",
          "url": "string",
          "icon_url": "string"
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/team/members/invite', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "favorite": true,
      "mute": true,
      "photo": "<binary>",
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "mobile": "string",
      "manager": true,
      "member": true,
      "status": "string",
      "icon_url": "string",
      "addon_links": [
        {
          "title": "Example Title",
          "package": "string",
          "url": "string",
          "icon_url": "string"
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "team_id": 0,
  "favorite": True,
  "mute": True,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": True,
  "member": True,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}

response = requests.post('https://api.mytommy.com/v1/team/members/invite', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/team/members/invite')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "team_id": 0,
    "favorite": true,
    "mute": true,
    "photo": "<binary>",
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "mobile": "string",
    "manager": true,
    "member": true,
    "status": "string",
    "icon_url": "string",
    "addon_links": [
      {
        "title": "Example Title",
        "package": "string",
        "url": "string",
        "icon_url": "string"
      }
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/team/members/invite", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a teams

GET
https://api.mytommy.com/v1/teams/{id}

Get a teams object by slug.

Parameters

idstringrequiredpath

Team slug

Response

200OKobject

Team response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a teams
curl -X GET 'https://api.mytommy.com/v1/teams/{id}'
const response = await fetch('https://api.mytommy.com/v1/teams/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/teams/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/teams/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/teams/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/teams/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Developer

Developer-focused endpoints for addons and integrations.

Get all developers on the system

GET
https://api.mytommy.com/v1/developers

Get all developers on the system.

Response

200OKArray<object & any>

Developer response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all developers on the system
curl -X GET 'https://api.mytommy.com/v1/developers'
const response = await fetch('https://api.mytommy.com/v1/developers', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "name": "Example Name",
    "details": "string",
    "icon_url": "string",
    "addons": [
      {
        "id": 123,
        "user_id": 0,
        "developer_id": 0,
        "package": "string",
        "title": "Example Title",
        "author": "string",
        "environment": "string",
        "version": "string",
        "description": "Short description",
        "homepage": "string",
        "icon_url": "string",
        "file_base_url": "string",
        "installed": true,
        "updated_at": "2025-01-02T12:00:00.000Z",
        "roles": [
          "string"
        ],
        "permissions": [
          {}
        ],
        "input_devices": [
          {}
        ],
        "locales": [
          "string"
        ],
        "views": [
          {
            "id": 123,
            "title": "Example Title",
            "type": "string",
            "path": "string",
            "index": true,
            "icon_url": "string"
          }
        ]
      }
    ],
    "actions": [
      {
        "id": 123,
        "user_id": 0,
        "developer_id": 0,
        "action_version_id": 0,
        "author": "string",
        "trigger": {
          "id": 123,
          "action_version_id": 0,
          "name": "Example Name",
          "description": "Short description"
        },
        "activity": {
          "id": 123,
          "action_version_id": 0,
          "name": "Example Name",
          "description": "Short description"
        },
        "dependencies": {},
        "name": "Example Name",
        "summary": "string",
        "description": "Short description",
        "icon_url": "string",
        "installed": true,
        "kind": "string",
        "unique": true
      }
    ],
    "solutions": [
      {
        "id": 123,
        "user_id": 0,
        "developer_id": 0,
        "name": "Example Name",
        "summary": "string",
        "description": "Short description"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a developer

GET
https://api.mytommy.com/v1/developers/{id}

Get a developer object by user ID.

Parameters

idinteger<int64>requiredpath

Developer id

Response

200OKobject & any

Developer response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a developer
curl -X GET 'https://api.mytommy.com/v1/developers/{id}'
const response = await fetch('https://api.mytommy.com/v1/developers/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "name": "Example Name",
  "details": "string",
  "icon_url": "string",
  "addons": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "package": "string",
      "title": "Example Title",
      "author": "string",
      "environment": "string",
      "version": "string",
      "description": "Short description",
      "homepage": "string",
      "icon_url": "string",
      "file_base_url": "string",
      "installed": true,
      "updated_at": "2025-01-02T12:00:00.000Z",
      "roles": [
        "string"
      ],
      "permissions": [
        {}
      ],
      "input_devices": [
        {}
      ],
      "locales": [
        "string"
      ],
      "views": [
        {
          "id": 123,
          "title": "Example Title",
          "type": "string",
          "path": "string",
          "index": true,
          "icon_url": "string"
        }
      ]
    }
  ],
  "actions": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "action_version_id": 0,
      "author": "string",
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "dependencies": {},
      "name": "Example Name",
      "summary": "string",
      "description": "Short description",
      "icon_url": "string",
      "installed": true,
      "kind": "string",
      "unique": true
    }
  ],
  "solutions": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "name": "Example Name",
      "summary": "string",
      "description": "Short description"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get developer addons

GET
https://api.mytommy.com/v1/developers/{id}/addons

Get all addons for a specific developer.

Parameters

idinteger<int64>requiredpath

Developer id

Response

200OKArray<any>

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get developer addons
curl -X GET 'https://api.mytommy.com/v1/developers/{id}/addons'
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/addons', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/addons', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers/{id}/addons')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers/{id}/addons')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers/{id}/addons", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get developer actions

GET
https://api.mytommy.com/v1/developers/{id}/actions

Get all actions for a specific developer.

Parameters

idinteger<int64>requiredpath

Developer id

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get developer actions
curl -X GET 'https://api.mytommy.com/v1/developers/{id}/actions'
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/actions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/actions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers/{id}/actions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers/{id}/actions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers/{id}/actions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Addon

Discover, manage, and interact with addons.

Get developer addons

GET
https://api.mytommy.com/v1/developers/{id}/addons

Get all addons for a specific developer.

Parameters

idinteger<int64>requiredpath

Developer id

Response

200OKArray<any>

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get developer addons
curl -X GET 'https://api.mytommy.com/v1/developers/{id}/addons'
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/addons', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/addons', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers/{id}/addons')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers/{id}/addons')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers/{id}/addons", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get all addons

GET
https://api.mytommy.com/v1/addons

Get all addons available for install by the current team or user.

Response

200OKArray<any>

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all addons
curl -X GET 'https://api.mytommy.com/v1/addons'
const response = await fetch('https://api.mytommy.com/v1/addons', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get installed addons

GET
https://api.mytommy.com/v1/addons/installed

Get all addons installed for the current team or user.

Response

200OKArray<any>

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get installed addons
curl -X GET 'https://api.mytommy.com/v1/addons/installed'
const response = await fetch('https://api.mytommy.com/v1/addons/installed', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/installed', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/installed')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/installed')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/installed", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an addon

GET
https://api.mytommy.com/v1/addons/{package}

Get an addon by it's package name.

Parameters

packagestringrequiredpath

Addon package

Response

200OKany

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an addon
curl -X GET 'https://api.mytommy.com/v1/addons/{package}'
const response = await fetch('https://api.mytommy.com/v1/addons/{package}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{package}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{package}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{package}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{package}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Report addon as inappropriate

POST
https://api.mytommy.com/v1/addons/{package}/report

Report addon as inappropriate.

Parameters

packagestringrequiredpath

Addon package

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Report addon as inappropriate
curl -X POST 'https://api.mytommy.com/v1/addons/{package}/report'
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/report', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/report', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/addons/{package}/report')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{package}/report')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/addons/{package}/report", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get addon actions

GET
https://api.mytommy.com/v1/addons/{package}/actions

Get all actions for an addon.

Parameters

packagestringrequiredpath

Addon package

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get addon actions
curl -X GET 'https://api.mytommy.com/v1/addons/{package}/actions'
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/actions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/actions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{package}/actions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{package}/actions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{package}/actions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get installed addon

GET
https://api.mytommy.com/v1/addons/{addon_package}/install

Get an installed addon.

Parameters

addon_packagestringrequiredpath

Addon package

Response

200OKany

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get installed addon
curl -X GET 'https://api.mytommy.com/v1/addons/{addon_package}/install'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{addon_package}/install')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{addon_package}/install", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Install addon

POST
https://api.mytommy.com/v1/addons/{addon_package}/install

Install an addon.

Body

application/json

Addon request

idinteger<int64>required

Unique identifier

user_idinteger<int64>required
developer_idinteger<int64>
packagestringrequired
titlestring

Human-friendly title

authorstring
environmentstring
versionstring
descriptionstring

Human-friendly description

homepagestring
icon_urlstring
file_base_urlstring
installedboolean
updated_atstring<date-time>

Last update timestamp (ISO8601)

rolesArray<string>

Array of roles required to install this addon.

permissionsArray<object>
input_devicesArray<object>
localesArray<string>
viewsArray<any>
Show child attributes
idstring

Unique identifier

titlestring

Human-friendly title

typestring
pathstring
indexboolean
icon_urlstring

Parameters

addon_packagestringrequiredpath

Addon package

Response

201Createdany

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Install addon
curl -X POST 'https://api.mytommy.com/v1/addons/{addon_package}/install' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "package": "string",
      "title": "Example Title",
      "author": "string",
      "environment": "string",
      "version": "string",
      "description": "Short description",
      "homepage": "string",
      "icon_url": "string",
      "file_base_url": "string",
      "installed": true,
      "updated_at": "2025-01-02T12:00:00.000Z",
      "roles": [
        "string"
      ],
      "permissions": [
        {}
      ],
      "input_devices": [
        {}
      ],
      "locales": [
        "string"
      ],
      "views": [
        {
          "id": 123,
          "title": "Example Title",
          "type": "string",
          "path": "string",
          "index": true,
          "icon_url": "string"
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "package": "string",
      "title": "Example Title",
      "author": "string",
      "environment": "string",
      "version": "string",
      "description": "Short description",
      "homepage": "string",
      "icon_url": "string",
      "file_base_url": "string",
      "installed": true,
      "updated_at": "2025-01-02T12:00:00.000Z",
      "roles": [
        "string"
      ],
      "permissions": [
        {}
      ],
      "input_devices": [
        {}
      ],
      "locales": [
        "string"
      ],
      "views": [
        {
          "id": 123,
          "title": "Example Title",
          "type": "string",
          "path": "string",
          "index": true,
          "icon_url": "string"
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": True,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": True,
      "icon_url": "string"
    }
  ]
}

response = requests.post('https://api.mytommy.com/v1/addons/{addon_package}/install', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/addons/{addon_package}/install", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update installed addon

PUT
https://api.mytommy.com/v1/addons/{addon_package}/install

Update an installed addon.

Parameters

addon_packagestringrequiredpath

Addon package

Response

200OKany

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update installed addon
curl -X PUT 'https://api.mytommy.com/v1/addons/{addon_package}/install'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'PUT',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'PUT',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.put('https://api.mytommy.com/v1/addons/{addon_package}/install')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install')
request = Net::HTTP::Put.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/addons/{addon_package}/install", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete installed addon

DELETE
https://api.mytommy.com/v1/addons/{addon_package}/install

Delete an installed addon.

Parameters

addon_packagestringrequiredpath

Addon package

Response

200OKany

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete installed addon
curl -X DELETE 'https://api.mytommy.com/v1/addons/{addon_package}/install'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/addons/{addon_package}/install')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/addons/{addon_package}/install", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get addon permissions

GET
https://api.mytommy.com/v1/addons/{addon_package}/install/permissions

Get all addon permission objects.

Parameters

addon_packagestringrequiredpath

Addon package

Response

200OKany

Permission response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get addon permissions
curl -X GET 'https://api.mytommy.com/v1/addons/{addon_package}/install/permissions'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{addon_package}/install/permissions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get addon permission

GET
https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}

Get an addon permission object.

Parameters

addon_packagestringrequiredpath

Addon package

namestringrequiredpath

Permission name

Response

200OKany

Permission response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get addon permission
curl -X GET 'https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update addon permission

PUT
https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}

Update an addon permission object.

Body

application/json

Permission request

user_idinteger<int64>
team_idinteger<int64>
namestring

Display name

titlestring

Human-friendly title

hintstring
resource_typestring
resource_kindstring
operationsArray<string>

Array of permissable operations

Parameters

addon_packagestringrequiredpath

Addon package

namestringrequiredpath

Permission name

Response

200OKany

Permission response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update addon permission
curl -X PUT 'https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "team_id": 0,
    "name": "Example Name",
    "title": "Example Title",
    "hint": "string",
    "resource_type": "string",
    "resource_kind": "string",
    "operations": [
      "string"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "name": "Example Name",
      "title": "Example Title",
      "hint": "string",
      "resource_type": "string",
      "resource_kind": "string",
      "operations": [
        "string"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "name": "Example Name",
      "title": "Example Title",
      "hint": "string",
      "resource_type": "string",
      "resource_kind": "string",
      "operations": [
        "string"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}

response = requests.put('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "team_id": 0,
    "name": "Example Name",
    "title": "Example Title",
    "hint": "string",
    "resource_type": "string",
    "resource_kind": "string",
    "operations": [
      "string"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "team_id": 0,
    "name": "Example Name",
    "title": "Example Title",
    "hint": "string",
    "resource_type": "string",
    "resource_kind": "string",
    "operations": [
      "string"
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/addons/{addon_package}/install/permissions/{name}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get all addon settings

GET
https://api.mytommy.com/v1/addons/{addon_package}/install/settings

Get all addon settings objects.

Parameters

addon_packagestringrequiredpath

Addon package

Response

200OKany

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all addon settings
curl -X GET 'https://api.mytommy.com/v1/addons/{addon_package}/install/settings'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{addon_package}/install/settings')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/settings')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{addon_package}/install/settings", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get addon setting

GET
https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}

Get an addon setting object.

Parameters

addon_packagestringrequiredpath

Addon package

namestringrequiredpath

Setting name

Response

200OKany

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get addon setting
curl -X GET 'https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update addon settings

PUT
https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}

Update an addon settings object.

Body

application/json

Setting request

user_idinteger<int64>
team_idinteger<int64>
addon_install_idinteger<int64>
resource_idinteger<int64>
resource_typestring
contextstring
formatstring
dataobjectrequired

Setting data as JSON.

Parameters

addon_packagestringrequiredpath

Addon package

namestringrequiredpath

Setting name

Response

200OKany

Setting response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update addon settings
curl -X PUT 'https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0,
    "team_id": 0,
    "addon_install_id": 0,
    "resource_id": 0,
    "resource_type": "string",
    "context": "string",
    "format": "string",
    "data": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "addon_install_id": 0,
      "resource_id": 0,
      "resource_type": "string",
      "context": "string",
      "format": "string",
      "data": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0,
      "team_id": 0,
      "addon_install_id": 0,
      "resource_id": 0,
      "resource_type": "string",
      "context": "string",
      "format": "string",
      "data": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}

response = requests.put('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0,
    "team_id": 0,
    "addon_install_id": 0,
    "resource_id": 0,
    "resource_type": "string",
    "context": "string",
    "format": "string",
    "data": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0,
    "team_id": 0,
    "addon_install_id": 0,
    "resource_id": 0,
    "resource_type": "string",
    "context": "string",
    "format": "string",
    "data": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}
{
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete addon setting

DELETE
https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}

Delete an addon setting object.

Parameters

addon_packagestringrequiredpath

Addon package

namestringrequiredpath

Setting name

Response

200OK

Null response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete addon setting
curl -X DELETE 'https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}'
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/addons/{addon_package}/install/settings/{name}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Search addons

GET
https://api.mytommy.com/v1/addons/search

Get all addons matching the given search term.

Parameters

termstringrequiredquery

Search term used to filter addons

Response

200OKArray<any>

Addon response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Search addons
curl -X GET 'https://api.mytommy.com/v1/addons/search'
const response = await fetch('https://api.mytommy.com/v1/addons/search', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/search', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/search')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/search')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/search", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "package": "string",
    "title": "Example Title",
    "author": "string",
    "environment": "string",
    "version": "string",
    "description": "Short description",
    "homepage": "string",
    "icon_url": "string",
    "file_base_url": "string",
    "installed": true,
    "updated_at": "2025-01-02T12:00:00.000Z",
    "roles": [
      "string"
    ],
    "permissions": [
      {}
    ],
    "input_devices": [
      {}
    ],
    "locales": [
      "string"
    ],
    "views": [
      {
        "id": 123,
        "title": "Example Title",
        "type": "string",
        "path": "string",
        "index": true,
        "icon_url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Action

List and manage actions, triggers, and related tasks.

Get developer actions

GET
https://api.mytommy.com/v1/developers/{id}/actions

Get all actions for a specific developer.

Parameters

idinteger<int64>requiredpath

Developer id

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get developer actions
curl -X GET 'https://api.mytommy.com/v1/developers/{id}/actions'
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/actions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/developers/{id}/actions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/developers/{id}/actions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/developers/{id}/actions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/developers/{id}/actions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get all actions

GET
https://api.mytommy.com/v1/actions

Get all available actions.

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all actions
curl -X GET 'https://api.mytommy.com/v1/actions'
const response = await fetch('https://api.mytommy.com/v1/actions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get installed actions

GET
https://api.mytommy.com/v1/actions/installed

Get all installed actions for the current team or user.

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get installed actions
curl -X GET 'https://api.mytommy.com/v1/actions/installed'
const response = await fetch('https://api.mytommy.com/v1/actions/installed', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installed', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/installed')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installed')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installed", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get recent actions

GET
https://api.mytommy.com/v1/actions/recent

Get recently used actions for the current team or user.

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get recent actions
curl -X GET 'https://api.mytommy.com/v1/actions/recent'
const response = await fetch('https://api.mytommy.com/v1/actions/recent', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/recent', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/recent')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/recent')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/recent", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get action

GET
https://api.mytommy.com/v1/actions/{id}

Get a specific action by ID.

Parameters

idstringrequiredpath

Action id

Response

200OKany

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get action
curl -X GET 'https://api.mytommy.com/v1/actions/{id}'
const response = await fetch('https://api.mytommy.com/v1/actions/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get action variables

GET
https://api.mytommy.com/v1/actions/{id}/variables

Get variables for a specific action.

Parameters

idstringrequiredpath

Action id

Response

200OKobject

object response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get action variables
curl -X GET 'https://api.mytommy.com/v1/actions/{id}/variables'
const response = await fetch('https://api.mytommy.com/v1/actions/{id}/variables', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/{id}/variables', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/{id}/variables')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/{id}/variables')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/{id}/variables", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

List action installs

GET
https://api.mytommy.com/v1/actions/installs

Get all action installs for the current team or user.

Response

200OKArray<any>

ActionInstall response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

List action installs
curl -X GET 'https://api.mytommy.com/v1/actions/installs'
const response = await fetch('https://api.mytommy.com/v1/actions/installs', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/installs')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installs", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "action_id": 0,
    "addon_install_id": 0,
    "title": "Example Title",
    "summary": "string",
    "description": "Short description",
    "schedule": {},
    "installed": true,
    "deleted_at": "2024-01-15T09:30:00Z",
    "updated_at": "2025-01-02T12:00:00.000Z",
    "tag_ids": [
      0
    ],
    "tags_list": [
      "string"
    ],
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "settings": {}
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Install action

POST
https://api.mytommy.com/v1/actions/installs

Install an action for the current team or user.

Body

application/json

Action request

idinteger<int64>

Unique identifier

user_idinteger<int64>
developer_idinteger<int64>
action_version_idinteger<int64>
authorstring
triggerany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

activityany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

dependenciesobject
namestring

Display name

summarystring
descriptionstring

Human-friendly description

icon_urlstring
installedboolean
kindstring
uniqueboolean

Response

201Createdany

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Install action
curl -X POST 'https://api.mytommy.com/v1/actions/installs' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }'
const response = await fetch('https://api.mytommy.com/v1/actions/installs', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "action_version_id": 0,
      "author": "string",
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "dependencies": {},
      "name": "Example Name",
      "summary": "string",
      "description": "Short description",
      "icon_url": "string",
      "installed": true,
      "kind": "string",
      "unique": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "action_version_id": 0,
      "author": "string",
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "dependencies": {},
      "name": "Example Name",
      "summary": "string",
      "description": "Short description",
      "icon_url": "string",
      "installed": true,
      "kind": "string",
      "unique": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": True,
  "kind": "string",
  "unique": True
}

response = requests.post('https://api.mytommy.com/v1/actions/installs', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/actions/installs", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get installed action

GET
https://api.mytommy.com/v1/actions/installs/{id}

Get an action install by ID.

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKany

ActionInstall response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get installed action
curl -X GET 'https://api.mytommy.com/v1/actions/installs/{id}'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/installs/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installs/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": true,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update action install

PUT
https://api.mytommy.com/v1/actions/installs/{id}

Update an action install.

Body

application/json

ActionInstall request

idinteger<int64>

Unique identifier

action_idinteger<int64>
addon_install_idinteger<int64>
titlestring

Human-friendly title

summarystring
descriptionstring

Human-friendly description

scheduleobject
installedboolean
deleted_atstring<date-time>
updated_atstring<date-time>

Last update timestamp (ISO8601)

tag_idsArray<integer>
tags_listArray<string>
triggerany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

activityany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

settingsobject

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKany

ActionInstall response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update action install
curl -X PUT 'https://api.mytommy.com/v1/actions/installs/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 123,
    "action_id": 0,
    "addon_install_id": 0,
    "title": "Example Title",
    "summary": "string",
    "description": "Short description",
    "schedule": {},
    "installed": true,
    "deleted_at": "2024-01-15T09:30:00Z",
    "updated_at": "2025-01-02T12:00:00.000Z",
    "tag_ids": [
      0
    ],
    "tags_list": [
      "string"
    ],
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "settings": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "action_id": 0,
      "addon_install_id": 0,
      "title": "Example Title",
      "summary": "string",
      "description": "Short description",
      "schedule": {},
      "installed": true,
      "deleted_at": "2024-01-15T09:30:00Z",
      "updated_at": "2025-01-02T12:00:00.000Z",
      "tag_ids": [
        0
      ],
      "tags_list": [
        "string"
      ],
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "settings": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 123,
      "action_id": 0,
      "addon_install_id": 0,
      "title": "Example Title",
      "summary": "string",
      "description": "Short description",
      "schedule": {},
      "installed": true,
      "deleted_at": "2024-01-15T09:30:00Z",
      "updated_at": "2025-01-02T12:00:00.000Z",
      "tag_ids": [
        0
      ],
      "tags_list": [
        "string"
      ],
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "settings": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": True,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}

response = requests.put('https://api.mytommy.com/v1/actions/installs/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 123,
    "action_id": 0,
    "addon_install_id": 0,
    "title": "Example Title",
    "summary": "string",
    "description": "Short description",
    "schedule": {},
    "installed": true,
    "deleted_at": "2024-01-15T09:30:00Z",
    "updated_at": "2025-01-02T12:00:00.000Z",
    "tag_ids": [
      0
    ],
    "tags_list": [
      "string"
    ],
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "settings": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 123,
    "action_id": 0,
    "addon_install_id": 0,
    "title": "Example Title",
    "summary": "string",
    "description": "Short description",
    "schedule": {},
    "installed": true,
    "deleted_at": "2024-01-15T09:30:00Z",
    "updated_at": "2025-01-02T12:00:00.000Z",
    "tag_ids": [
      0
    ],
    "tags_list": [
      "string"
    ],
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "settings": {}
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/actions/installs/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": true,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}
{
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": true,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete installed action

DELETE
https://api.mytommy.com/v1/actions/installs/{id}

Delete an action install.

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKany

ActionInstall response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete installed action
curl -X DELETE 'https://api.mytommy.com/v1/actions/installs/{id}'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/actions/installs/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/actions/installs/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": true,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Run an action

GET
https://api.mytommy.com/v1/actions/installs/{id}/run

Run an installed action.

Body

application/json

TriggerData request

trigger_dataobject

Trigger data object

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKany

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Run an action
curl -X GET 'https://api.mytommy.com/v1/actions/installs/{id}/run' \
  -H 'Content-Type: application/json' \
  -d '{
    "trigger_data": {}
  }'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/run', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "trigger_data": {}
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/run', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "trigger_data": {}
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "trigger_data": {}
}

response = requests.get('https://api.mytommy.com/v1/actions/installs/{id}/run', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}/run')
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "trigger_data": {}
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "trigger_data": {}
  }`)
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installs/{id}/run", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "trigger_data": {}
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Run an action later

GET
https://api.mytommy.com/v1/actions/installs/{id}/run_later

Schedule an installed action to run later.

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKany

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Run an action later
curl -X GET 'https://api.mytommy.com/v1/actions/installs/{id}/run_later'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/run_later', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/run_later', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/installs/{id}/run_later')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}/run_later')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installs/{id}/run_later", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get action event history

GET
https://api.mytommy.com/v1/actions/installs/{id}/history

Get history for an installed action.

Parameters

idstringrequiredpath

ActionInstall id

Response

200OKArray<any>

AuditLog response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get action event history
curl -X GET 'https://api.mytommy.com/v1/actions/installs/{id}/history'
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/history', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/installs/{id}/history', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/installs/{id}/history')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/installs/{id}/history')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/installs/{id}/history", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "user_id": 0,
    "team_id": 0,
    "name": "Example Name",
    "message": "string"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get addon actions

GET
https://api.mytommy.com/v1/addons/{package}/actions

Get all actions for an addon.

Parameters

packagestringrequiredpath

Addon package

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get addon actions
curl -X GET 'https://api.mytommy.com/v1/addons/{package}/actions'
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/actions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/addons/{package}/actions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/addons/{package}/actions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/addons/{package}/actions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/addons/{package}/actions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Search actions

GET
https://api.mytommy.com/v1/actions/search

Search actions by term.

Parameters

termstringrequiredquery

Search term used to filter actions

Response

200OKArray<any>

Action response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Search actions
curl -X GET 'https://api.mytommy.com/v1/actions/search'
const response = await fetch('https://api.mytommy.com/v1/actions/search', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/actions/search', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/actions/search')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/actions/search')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/actions/search", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "developer_id": 0,
    "action_version_id": 0,
    "author": "string",
    "trigger": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "activity": {
      "id": 123,
      "action_version_id": 0,
      "name": "Example Name",
      "description": "Short description"
    },
    "dependencies": {},
    "name": "Example Name",
    "summary": "string",
    "description": "Short description",
    "icon_url": "string",
    "installed": true,
    "kind": "string",
    "unique": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Chat

Start chats, list conversations, and manage participants.

Get chat rooms

GET
https://api.mytommy.com/v1/chats

Get all chat rooms.

Response

200OKArray<any>

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get chat rooms
curl -X GET 'https://api.mytommy.com/v1/chats'
const response = await fetch('https://api.mytommy.com/v1/chats', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/chats')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/chats", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 222,
    "user_id": 0,
    "team_id": 0,
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "unread_messages_count": 0,
    "users": [
      {
        "id": 123,
        "chat_id": 0,
        "user_id": 0,
        "first_name": "string",
        "last_name": "string",
        "icon_url": "string",
        "deleted": true
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create chat room

POST
https://api.mytommy.com/v1/chats

Create a chat room with multiple users.

Body

application/json

ChatInput request

titlestring

The chat room title.

groupboolean
favoriteboolean
muteboolean
user_idsArray<integer>

Response

201Createdany

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create chat room
curl -X POST 'https://api.mytommy.com/v1/chats' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/chats', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "user_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "user_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "title": "Example Title",
  "group": True,
  "favorite": True,
  "mute": True,
  "user_ids": [
    0
  ]
}

response = requests.post('https://api.mytommy.com/v1/chats', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/chats", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "user_ids": [
    0
  ]
}
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get or create chat room

POST
https://api.mytommy.com/v1/chats/initiate

Get or create a chat room with multiple given users.

Body

application/json

ChatInitiateInput request

Array of user IDs to initiate the chat with.

user_idsArray<integer>required

Response

200OKany

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get or create chat room
curl -X POST 'https://api.mytommy.com/v1/chats/initiate' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/initiate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/initiate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_ids": [
    0
  ]
}

response = requests.post('https://api.mytommy.com/v1/chats/initiate', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/initiate')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/chats/initiate", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_ids": [
    0
  ]
}
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get chat

GET
https://api.mytommy.com/v1/chats/{id}

Get a single chat object by it's ID.

Parameters

idinteger<int64>requiredpath

Chat id

Response

200OKany

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get chat
curl -X GET 'https://api.mytommy.com/v1/chats/{id}'
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/chats/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/chats/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update chat

PUT
https://api.mytommy.com/v1/chats/{id}

Update a chat object.

Body

application/json

ChatInput request

titlestring

The chat room title.

groupboolean
favoriteboolean
muteboolean
user_idsArray<integer>

Parameters

idinteger<int64>requiredpath

Chat id

Response

200OKany

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update chat
curl -X PUT 'https://api.mytommy.com/v1/chats/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "user_ids": [
        0
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "user_ids": [
        0
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "title": "Example Title",
  "group": True,
  "favorite": True,
  "mute": True,
  "user_ids": [
    0
  ]
}

response = requests.put('https://api.mytommy.com/v1/chats/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "user_ids": [
      0
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/chats/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "user_ids": [
    0
  ]
}
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete chat

DELETE
https://api.mytommy.com/v1/chats/{id}

Delete a chat object.

Body

application/json

Chat request

A representation of a Chat

idinteger<int64>

Unique chat identifier

user_idinteger<int64>

The user ID of the chat owner.

team_idinteger<int64>

The team ID.

titlestring

The chat room title.

groupboolean
favoriteboolean
muteboolean
unread_messages_countinteger<int64>
usersArray<any>
Show child attributes
idinteger<int64>

Unique identifier

chat_idinteger<int64>required
user_idinteger<int64>required
first_namestring
last_namestring
icon_urlstring
deletedboolean

Parameters

idinteger<int64>requiredpath

Chat id

Response

200OKany

Chat response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete chat
curl -X DELETE 'https://api.mytommy.com/v1/chats/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 222,
    "user_id": 0,
    "team_id": 0,
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "unread_messages_count": 0,
    "users": [
      {
        "id": 123,
        "chat_id": 0,
        "user_id": 0,
        "first_name": "string",
        "last_name": "string",
        "icon_url": "string",
        "deleted": true
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 222,
      "user_id": 0,
      "team_id": 0,
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "unread_messages_count": 0,
      "users": [
        {
          "id": 123,
          "chat_id": 0,
          "user_id": 0,
          "first_name": "string",
          "last_name": "string",
          "icon_url": "string",
          "deleted": true
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{id}', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 222,
      "user_id": 0,
      "team_id": 0,
      "title": "Example Title",
      "group": true,
      "favorite": true,
      "mute": true,
      "unread_messages_count": 0,
      "users": [
        {
          "id": 123,
          "chat_id": 0,
          "user_id": 0,
          "first_name": "string",
          "last_name": "string",
          "icon_url": "string",
          "deleted": true
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": True,
  "favorite": True,
  "mute": True,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": True
    }
  ]
}

response = requests.delete('https://api.mytommy.com/v1/chats/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{id}')
request = Net::HTTP::Delete.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 222,
    "user_id": 0,
    "team_id": 0,
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "unread_messages_count": 0,
    "users": [
      {
        "id": 123,
        "chat_id": 0,
        "user_id": 0,
        "first_name": "string",
        "last_name": "string",
        "icon_url": "string",
        "deleted": true
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 222,
    "user_id": 0,
    "team_id": 0,
    "title": "Example Title",
    "group": true,
    "favorite": true,
    "mute": true,
    "unread_messages_count": 0,
    "users": [
      {
        "id": 123,
        "chat_id": 0,
        "user_id": 0,
        "first_name": "string",
        "last_name": "string",
        "icon_url": "string",
        "deleted": true
      }
    ]
  }`)
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/chats/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get chat messages

GET
https://api.mytommy.com/v1/chats/{chat_id}/messages

Get all messages belonging to the given chat.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

Response

200OKArray<any>

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get chat messages
curl -X GET 'https://api.mytommy.com/v1/chats/{chat_id}/messages'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/chats/{chat_id}/messages')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/messages')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/chats/{chat_id}/messages", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create create message

POST
https://api.mytommy.com/v1/chats/{chat_id}/messages

Create a chat and send it to the chat participants.

Body

application/json

MessageInput request

chat_idinteger<int64>
sender_idinteger<int64>required
bodystringrequired
kindstring
send_atstring<date-time>

Time in the future to send the message

attachmentsArray<string>
Show child attributes

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

Response

201Createdany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

429Too Many Requestsany

Rate limit error

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create create message
curl -X POST 'https://api.mytommy.com/v1/chats/{chat_id}/messages' \
  -H 'Content-Type: application/json' \
  -d '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}

response = requests.post('https://api.mytommy.com/v1/chats/{chat_id}/messages', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/messages')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/chats/{chat_id}/messages", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get chat message

GET
https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}

Get a chat message belonging to the given chat.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

idinteger<int64>requiredpath

Message id

Response

200OKany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get chat message
curl -X GET 'https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete chat message

DELETE
https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}

Delete a chat message belonging to the given chat.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

idinteger<int64>requiredpath

Message id

Response

200OKany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete chat message
curl -X DELETE 'https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/chats/{chat_id}/messages/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get chat users

GET
https://api.mytommy.com/v1/chats/{chat_id}/users

Get all users participating in the given chat.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

Response

200OKArray<any>

ChatUser response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get chat users
curl -X GET 'https://api.mytommy.com/v1/chats/{chat_id}/users'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/chats/{chat_id}/users')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/users')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/chats/{chat_id}/users", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "chat_id": 0,
    "user_id": 0,
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "deleted": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create chat user

POST
https://api.mytommy.com/v1/chats/{chat_id}/users

Create and add a user to the chat.

Body

application/json

UserID request

User ID parameter

user_idinteger<int64>

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

Response

201Createdany

ChatUser response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create chat user
curl -X POST 'https://api.mytommy.com/v1/chats/{chat_id}/users' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": 0
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "user_id": 0
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "user_id": 0
}

response = requests.post('https://api.mytommy.com/v1/chats/{chat_id}/users', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/users')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "user_id": 0
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "user_id": 0
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/chats/{chat_id}/users", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "user_id": 0
}
{
  "id": 123,
  "chat_id": 0,
  "user_id": 0,
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "deleted": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete chat user

DELETE
https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}

Delete a chat user.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

user_idinteger<int64>requiredpath

User user_id

Response

200OKany

ChatUser response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete chat user
curl -X DELETE 'https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/chats/{chat_id}/users/{user_id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "chat_id": 0,
  "user_id": 0,
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "deleted": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create reaction

POST
https://api.mytommy.com/v1/chats/{chat_id}/reactions

Create a reaction to a message in the chat.

Body

application/json

ReactionInput request

message_idinteger<int64>required

The message ID to react to

valuestringrequired

The reaction emoji value

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

Response

201Createdany

MessageFlag response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create reaction
curl -X POST 'https://api.mytommy.com/v1/chats/{chat_id}/reactions' \
  -H 'Content-Type: application/json' \
  -d '{
    "message_id": 0,
    "value": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/reactions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "message_id": 0,
      "value": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/reactions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "message_id": 0,
      "value": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "message_id": 0,
  "value": "string"
}

response = requests.post('https://api.mytommy.com/v1/chats/{chat_id}/reactions', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/reactions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "message_id": 0,
    "value": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "message_id": 0,
    "value": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/chats/{chat_id}/reactions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "message_id": 0,
  "value": "string"
}
{
  "id": 123,
  "user_id": 0,
  "message_id": 0,
  "chat_id": 0,
  "kind": "string",
  "value": "string",
  "created_at": "2025-01-01T12:00:00.000Z",
  "updated_at": "2025-01-02T12:00:00.000Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete reaction

DELETE
https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}

Delete a reaction from a message.

Parameters

chat_idinteger<int64>requiredpath

Chat chat_id

idinteger<int64>requiredpath

MessageFlag id

Response

200OKany

MessageFlag response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete reaction
curl -X DELETE 'https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}'
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/chats/{chat_id}/reactions/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "message_id": 0,
  "chat_id": 0,
  "kind": "string",
  "value": "string",
  "created_at": "2025-01-01T12:00:00.000Z",
  "updated_at": "2025-01-02T12:00:00.000Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create and send a chat message to the receiver

POST
https://api.mytommy.com/v1/messages

Create and send a chat message to the receiver.

Body

application/json

MessageInput request

chat_idinteger<int64>
sender_idinteger<int64>required
bodystringrequired
kindstring
send_atstring<date-time>

Time in the future to send the message

attachmentsArray<string>
Show child attributes

Response

201Createdany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create and send a chat message to the receiver
curl -X POST 'https://api.mytommy.com/v1/messages' \
  -H 'Content-Type: application/json' \
  -d '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}

response = requests.post('https://api.mytommy.com/v1/messages', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/messages')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/messages", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get recent chat messages

GET
https://api.mytommy.com/v1/messages/recent

Get recent chat messages for the current account scope.

Response

200OKArray<any>

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get recent chat messages
curl -X GET 'https://api.mytommy.com/v1/messages/recent'
const response = await fetch('https://api.mytommy.com/v1/messages/recent', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/messages/recent', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/messages/recent')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/messages/recent')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/messages/recent", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get favorite chat messages

GET
https://api.mytommy.com/v1/messages/favorite

Get favorite chat messages for the current account scope.

Response

200OKArray<any>

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get favorite chat messages
curl -X GET 'https://api.mytommy.com/v1/messages/favorite'
const response = await fetch('https://api.mytommy.com/v1/messages/favorite', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/messages/favorite', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/messages/favorite')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/messages/favorite')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/messages/favorite", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Message

Send and retrieve messages, mark read, and more.

Update message

PUT
https://api.mytommy.com/v1/messages/{id}

Update a message object.

Body

application/json

MessageInput request

chat_idinteger<int64>
sender_idinteger<int64>required
bodystringrequired
kindstring
send_atstring<date-time>

Time in the future to send the message

attachmentsArray<string>
Show child attributes

Parameters

idinteger<int64>requiredpath

Message id

Response

200OKany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update message
curl -X PUT 'https://api.mytommy.com/v1/messages/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/messages/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/messages/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "chat_id": 0,
      "sender_id": 0,
      "body": "string",
      "kind": "string",
      "send_at": "2024-01-15T09:30:00Z",
      "attachments": [
        "<binary>"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}

response = requests.put('https://api.mytommy.com/v1/messages/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/messages/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "chat_id": 0,
    "sender_id": 0,
    "body": "string",
    "kind": "string",
    "send_at": "2024-01-15T09:30:00Z",
    "attachments": [
      "<binary>"
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/messages/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete message

DELETE
https://api.mytommy.com/v1/messages/{id}

Delete a message object.

Body

application/json

Message request

A representation of a Message

idinteger<int64>

Unique message identifier

chat_idinteger<int64>

Associated chat ID

sender_idinteger<int64>
bodystring

Message contents

kindstring
chat_titlestring
sender_first_namestring
sender_last_namestring
sender_icon_urlstring
sent_atstring<date-time>
attachmentsArray<any>
Show child attributes

Object that represents an Attachment.

signed_idstring
content_typestring
filenamestring
urlstring

Parameters

idinteger<int64>requiredpath

Message id

Response

200OKany

Message response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete message
curl -X DELETE 'https://api.mytommy.com/v1/messages/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/messages/{id}', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 333,
      "chat_id": 222,
      "sender_id": 0,
      "body": "Hello world",
      "kind": "string",
      "chat_title": "string",
      "sender_first_name": "string",
      "sender_last_name": "string",
      "sender_icon_url": "string",
      "sent_at": "2024-01-15T09:30:00Z",
      "attachments": [
        {
          "signed_id": "string",
          "content_type": "string",
          "filename": "string",
          "url": "string"
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/messages/{id}', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 333,
      "chat_id": 222,
      "sender_id": 0,
      "body": "Hello world",
      "kind": "string",
      "chat_title": "string",
      "sender_first_name": "string",
      "sender_last_name": "string",
      "sender_icon_url": "string",
      "sent_at": "2024-01-15T09:30:00Z",
      "attachments": [
        {
          "signed_id": "string",
          "content_type": "string",
          "filename": "string",
          "url": "string"
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}

response = requests.delete('https://api.mytommy.com/v1/messages/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/messages/{id}')
request = Net::HTTP::Delete.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 333,
    "chat_id": 222,
    "sender_id": 0,
    "body": "Hello world",
    "kind": "string",
    "chat_title": "string",
    "sender_first_name": "string",
    "sender_last_name": "string",
    "sender_icon_url": "string",
    "sent_at": "2024-01-15T09:30:00Z",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }`)
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/messages/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Fragment

Reusable content fragments and related operations.

Get fragments

GET
https://api.mytommy.com/v1/fragments

Get all fragments.

Response

200OKArray<object>

Fragment response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get fragments
curl -X GET 'https://api.mytommy.com/v1/fragments'
const response = await fetch('https://api.mytommy.com/v1/fragments', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/fragments', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/fragments')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/fragments')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/fragments", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "team_id": 0,
    "addons_install_id": 0,
    "kind": "string",
    "name": "Example Name",
    "data": {},
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "resource_id": 0,
    "resource_type": "string",
    "attachments": [
      {
        "signed_id": "string",
        "content_type": "string",
        "filename": "string",
        "url": "string"
      }
    ]
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create an fragment

POST
https://api.mytommy.com/v1/fragments

Create an fragment

Body

application/json

FragmentInput request

Object for creating or updating an Fragment.

kindstring
namestring

Display name

datastring
timestring<date-time>
parent_idinteger<int64>
attachmentsArray<string>
Show child attributes

Response

201Createdobject

Fragment response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create an fragment
curl -X POST 'https://api.mytommy.com/v1/fragments' \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/fragments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "name": "Example Name",
      "data": "string",
      "time": "2024-01-15T09:30:00Z",
      "parent_id": 0,
      "attachments": [
        "<binary>"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/fragments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "name": "Example Name",
      "data": "string",
      "time": "2024-01-15T09:30:00Z",
      "parent_id": 0,
      "attachments": [
        "<binary>"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "kind": "string",
  "name": "Example Name",
  "data": "string",
  "time": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "attachments": [
    "<binary>"
  ]
}

response = requests.post('https://api.mytommy.com/v1/fragments', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/fragments')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/fragments", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "kind": "string",
  "name": "Example Name",
  "data": "string",
  "time": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "attachments": [
    "<binary>"
  ]
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0,
  "kind": "string",
  "name": "Example Name",
  "data": {},
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an fragment

GET
https://api.mytommy.com/v1/fragments/{id}

Get an fragment object.

Parameters

idinteger<int64>requiredpath

Fragment id

Response

200OKobject

Fragment response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an fragment
curl -X GET 'https://api.mytommy.com/v1/fragments/{id}'
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/fragments/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/fragments/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/fragments/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0,
  "kind": "string",
  "name": "Example Name",
  "data": {},
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an fragment

PUT
https://api.mytommy.com/v1/fragments/{id}

Update an fragment object.

Body

application/json

FragmentInput request

Object for creating or updating an Fragment.

kindstring
namestring

Display name

datastring
timestring<date-time>
parent_idinteger<int64>
attachmentsArray<string>
Show child attributes

Parameters

idinteger<int64>requiredpath

Fragment id

Response

200OKobject

Fragment response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an fragment
curl -X PUT 'https://api.mytommy.com/v1/fragments/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "name": "Example Name",
      "data": "string",
      "time": "2024-01-15T09:30:00Z",
      "parent_id": 0,
      "attachments": [
        "<binary>"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "name": "Example Name",
      "data": "string",
      "time": "2024-01-15T09:30:00Z",
      "parent_id": 0,
      "attachments": [
        "<binary>"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "kind": "string",
  "name": "Example Name",
  "data": "string",
  "time": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "attachments": [
    "<binary>"
  ]
}

response = requests.put('https://api.mytommy.com/v1/fragments/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/fragments/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "kind": "string",
    "name": "Example Name",
    "data": "string",
    "time": "2024-01-15T09:30:00Z",
    "parent_id": 0,
    "attachments": [
      "<binary>"
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/fragments/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "kind": "string",
  "name": "Example Name",
  "data": "string",
  "time": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "attachments": [
    "<binary>"
  ]
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0,
  "kind": "string",
  "name": "Example Name",
  "data": {},
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete an fragment

DELETE
https://api.mytommy.com/v1/fragments/{id}

Delete an fragment object.

Parameters

idinteger<int64>requiredpath

Fragment id

Response

200OKobject

Fragment response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete an fragment
curl -X DELETE 'https://api.mytommy.com/v1/fragments/{id}'
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/fragments/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/fragments/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/fragments/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/fragments/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0,
  "kind": "string",
  "name": "Example Name",
  "data": {},
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Invitation

Create, accept, decline, and manage invitations.

Get all invitations associated with the current account

GET
https://api.mytommy.com/v1/invitations

Get all invitations associated with the current account.

Response

200OKArray<object & any>

Invitation response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get all invitations associated with the current account
curl -X GET 'https://api.mytommy.com/v1/invitations'
const response = await fetch('https://api.mytommy.com/v1/invitations', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/invitations', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/invitations')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/invitations')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/invitations", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "friend_id": 0,
    "invitee_id": 0,
    "invitee_type": "string",
    "message": "string",
    "user_id": 0,
    "team_id": 0,
    "inviter": {
      "id": 111,
      "type": "string",
      "user_id": 0,
      "team_id": 0,
      "name": "Acme Corp",
      "contact_name": "string",
      "kind": "string",
      "icon_url": "string",
      "mobile": "string",
      "notification_count": 0
    },
    "invitee": {
      "id": 111,
      "type": "string",
      "user_id": 0,
      "team_id": 0,
      "name": "Acme Corp",
      "contact_name": "string",
      "kind": "string",
      "icon_url": "string",
      "mobile": "string",
      "notification_count": 0
    },
    "contact": {
      "friend_id": 0,
      "favorite": true,
      "mute": true,
      "personal": true,
      "roles": [
        "string"
      ],
      "locations": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "id": 0,
      "type": "string",
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "email": "string",
      "mobile": "string",
      "status": "string",
      "member": true,
      "last_online_at": "2024-01-15T09:30:00Z"
    },
    "token": "string",
    "status": "string",
    "link": "string",
    "times_sent": 0,
    "sent_at": "2024-01-15T09:30:00Z",
    "accepted_at": "2024-01-15T09:30:00Z"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create invitation

POST
https://api.mytommy.com/v1/invitations

Create an invitation link for a member or non-menmer to connect with the current user or team.

Body

application/json

InvitationInput request

Object for creating an Invitation.

friend_idinteger<int64>
invitee_idinteger<int64>
invitee_typestring
messagestring

Response

201Createdobject & any

Invitation response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create invitation
curl -X POST 'https://api.mytommy.com/v1/invitations' \
  -H 'Content-Type: application/json' \
  -d '{
    "friend_id": 0,
    "invitee_id": 0,
    "invitee_type": "string",
    "message": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/invitations', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "friend_id": 0,
      "invitee_id": 0,
      "invitee_type": "string",
      "message": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/invitations', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "friend_id": 0,
      "invitee_id": 0,
      "invitee_type": "string",
      "message": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string"
}

response = requests.post('https://api.mytommy.com/v1/invitations', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/invitations')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "friend_id": 0,
    "invitee_id": 0,
    "invitee_type": "string",
    "message": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "friend_id": 0,
    "invitee_id": 0,
    "invitee_type": "string",
    "message": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/invitations", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string"
}
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string",
  "user_id": 0,
  "team_id": 0,
  "inviter": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "invitee": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "contact": {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  },
  "token": "string",
  "status": "string",
  "link": "string",
  "times_sent": 0,
  "sent_at": "2024-01-15T09:30:00Z",
  "accepted_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get invitations

GET
https://api.mytommy.com/v1/invitations/{token}

Get an invitations object by token.

Parameters

tokeninteger<int64>requiredpath

Invitation token

Response

200OKobject & any

Invitation response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get invitations
curl -X GET 'https://api.mytommy.com/v1/invitations/{token}'
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/invitations/{token}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/invitations/{token}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/invitations/{token}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string",
  "user_id": 0,
  "team_id": 0,
  "inviter": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "invitee": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "contact": {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  },
  "token": "string",
  "status": "string",
  "link": "string",
  "times_sent": 0,
  "sent_at": "2024-01-15T09:30:00Z",
  "accepted_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Accept an invitation

GET
https://api.mytommy.com/v1/invitations/{token}/accept

Accept an invitation belonging to the given token.

Parameters

tokenstringrequiredpath

Invitation token

Response

200OKobject & any

Invitation response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Accept an invitation
curl -X GET 'https://api.mytommy.com/v1/invitations/{token}/accept'
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}/accept', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}/accept', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/invitations/{token}/accept')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/invitations/{token}/accept')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/invitations/{token}/accept", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string",
  "user_id": 0,
  "team_id": 0,
  "inviter": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "invitee": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "contact": {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  },
  "token": "string",
  "status": "string",
  "link": "string",
  "times_sent": 0,
  "sent_at": "2024-01-15T09:30:00Z",
  "accepted_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Reject an invitation

GET
https://api.mytommy.com/v1/invitations/{token}/decline

Reject an invitation belonging to the given token.

Parameters

tokenstringrequiredpath

Invitation token

Response

200OKobject & any

Invitation response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Reject an invitation
curl -X GET 'https://api.mytommy.com/v1/invitations/{token}/decline'
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}/decline', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/invitations/{token}/decline', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/invitations/{token}/decline')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/invitations/{token}/decline')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/invitations/{token}/decline", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string",
  "user_id": 0,
  "team_id": 0,
  "inviter": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "invitee": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "contact": {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  },
  "token": "string",
  "status": "string",
  "link": "string",
  "times_sent": 0,
  "sent_at": "2024-01-15T09:30:00Z",
  "accepted_at": "2024-01-15T09:30:00Z"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Event

List and manage events and attendances.

Get events

GET
https://api.mytommy.com/v1/events

Get all events.

Response

200OKArray<object & any>

Event response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get events
curl -X GET 'https://api.mytommy.com/v1/events'
const response = await fetch('https://api.mytommy.com/v1/events', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/events', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/events')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/events')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/events", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z",
    "id": 0,
    "user_id": 0,
    "team_id": 0,
    "addons_install_id": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create an event

POST
https://api.mytommy.com/v1/events

Create an event

Body

application/json

EventInput request

Object for creating or updating an Event.

kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>

Response

201Createdobject & any

Event response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create an event
curl -X POST 'https://api.mytommy.com/v1/events' \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }'
const response = await fetch('https://api.mytommy.com/v1/events', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/events', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z"
}

response = requests.post('https://api.mytommy.com/v1/events', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/events')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/events", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z"
}
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an event

GET
https://api.mytommy.com/v1/events/{id}

Get an event object.

Parameters

idinteger<int64>requiredpath

Event id

Response

200OKobject & any

Event response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an event
curl -X GET 'https://api.mytommy.com/v1/events/{id}'
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/events/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/events/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/events/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an event

PUT
https://api.mytommy.com/v1/events/{id}

Update an event object.

Body

application/json

EventInput request

Object for creating or updating an Event.

kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>

Parameters

idinteger<int64>requiredpath

Event id

Response

200OKobject & any

Event response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an event
curl -X PUT 'https://api.mytommy.com/v1/events/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }'
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z"
}

response = requests.put('https://api.mytommy.com/v1/events/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/events/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/events/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z"
}
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete an event

DELETE
https://api.mytommy.com/v1/events/{id}

Delete an event object.

Parameters

idinteger<int64>requiredpath

Event id

Response

200OKobject & any

Event response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete an event
curl -X DELETE 'https://api.mytommy.com/v1/events/{id}'
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/events/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/events/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/events/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/events/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Session

Authentication and session-related endpoints.

Login

POST
https://api.mytommy.com/v1/sessions

This method handles users who are \ authenticating with an email or phone, and password combination.

Body

application/json

UserCredentials request

User login credentials

loginstringrequired
passwordstringrequired

Response

200OKobject

User response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Login
curl -X POST 'https://api.mytommy.com/v1/sessions' \
  -H 'Content-Type: application/json' \
  -d '{
    "login": "string",
    "password": "string"
  }'
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "login": "string",
      "password": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "login": "string",
      "password": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "login": "string",
  "password": "string"
}

response = requests.post('https://api.mytommy.com/v1/sessions', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/sessions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "login": "string",
    "password": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "login": "string",
    "password": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/sessions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "login": "string",
  "password": "string"
}
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Logout

DELETE
https://api.mytommy.com/v1/sessions

This method destroys the current user session.

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Logout
curl -X DELETE 'https://api.mytommy.com/v1/sessions'
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/sessions', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/sessions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/sessions')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/sessions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Geolocation

Geo services such as reverse geocoding and lookups.

Wallet

Payments, balances, and transactions.

Get wallet

GET
https://api.mytommy.com/v1/wallet

Get wallet owned by the current account.

Response

200OKArray<object>

Wallet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get wallet
curl -X GET 'https://api.mytommy.com/v1/wallet'
const response = await fetch('https://api.mytommy.com/v1/wallet', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "balance": 129900,
    "credit_limit": 0,
    "enable_notifications": true,
    "show_balance": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update a wallet

PUT
https://api.mytommy.com/v1/wallet

Update a wallet.

Body

application/json

WalletInput request

Object for updating a Wallet

enable_notificationsboolean
show_balanceboolean

Response

200OKobject

Wallet response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update a wallet
curl -X PUT 'https://api.mytommy.com/v1/wallet' \
  -H 'Content-Type: application/json' \
  -d '{
    "enable_notifications": true,
    "show_balance": true
  }'
const response = await fetch('https://api.mytommy.com/v1/wallet', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "enable_notifications": true,
      "show_balance": true
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "enable_notifications": true,
      "show_balance": true
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "enable_notifications": True,
  "show_balance": True
}

response = requests.put('https://api.mytommy.com/v1/wallet', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "enable_notifications": true,
    "show_balance": true
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "enable_notifications": true,
    "show_balance": true
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/wallet", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "enable_notifications": true,
  "show_balance": true
}
{
  "id": 123,
  "user_id": 0,
  "balance": 129900,
  "credit_limit": 0,
  "enable_notifications": true,
  "show_balance": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get wallet cards

GET
https://api.mytommy.com/v1/wallet/cards

Get wallet cards connected to the current account.

Response

200OKArray<object>

WalletCard response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get wallet cards
curl -X GET 'https://api.mytommy.com/v1/wallet/cards'
const response = await fetch('https://api.mytommy.com/v1/wallet/cards', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/cards', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet/cards')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/cards')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet/cards", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "wallet_id": 0,
    "wallet_account_id": 0,
    "name": "Example Name",
    "icon_url": "string",
    "balance": 0,
    "credit_limit": 0,
    "active": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get wallet accounts

GET
https://api.mytommy.com/v1/wallet/accounts

Get wallet accounts connected to the current account.

Response

200OKArray<object>

WalletAccount response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get wallet accounts
curl -X GET 'https://api.mytommy.com/v1/wallet/accounts'
const response = await fetch('https://api.mytommy.com/v1/wallet/accounts', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/accounts', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet/accounts')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/accounts')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet/accounts", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "team_id": 0,
    "name": "Example Name",
    "card_name": "string",
    "phone": "string",
    "vendor_reference": "string",
    "icon_url": "string",
    "description": "Short description",
    "enable_chat": true,
    "enable_integrations": true,
    "active": true
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a wallet account

GET
https://api.mytommy.com/v1/wallet/accounts/{id}

Get a wallet account by ID.

Parameters

idinteger<int64>requiredpath

WalletAccount id

Response

200OKobject

WalletAccount response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a wallet account
curl -X GET 'https://api.mytommy.com/v1/wallet/accounts/{id}'
const response = await fetch('https://api.mytommy.com/v1/wallet/accounts/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/accounts/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet/accounts/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/accounts/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet/accounts/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "team_id": 0,
  "name": "Example Name",
  "card_name": "string",
  "phone": "string",
  "vendor_reference": "string",
  "icon_url": "string",
  "description": "Short description",
  "enable_chat": true,
  "enable_integrations": true,
  "active": true
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get wallet transactions

GET
https://api.mytommy.com/v1/wallet/transactions

Get wallet transactions belonging to the current account.

Response

200OKArray<object>

WalletTransaction response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get wallet transactions
curl -X GET 'https://api.mytommy.com/v1/wallet/transactions'
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet/transactions')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/transactions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet/transactions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "wallet_card_id": 0,
    "wallet_account_id": 0,
    "addon_id": 0,
    "addon_install_id": 0,
    "payee_name": "string",
    "icon_url": "string",
    "invoice_url": "string",
    "status": "active",
    "amount": 0,
    "vendor_reference": "string"
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a wallet transaction

POST
https://api.mytommy.com/v1/wallet/transactions

Create a wallet transaction.

Body

application/json

WalletTransactionInput request

Object for creating or updating a Wallet Transaction

wallet_card_idinteger<int64>required
wallet_account_idinteger<int64>required
addon_idinteger<int64>
addon_install_idinteger<int64>
payee_namestring
amountnumber<double>required

Response

201Createdobject

WalletTransaction response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a wallet transaction
curl -X POST 'https://api.mytommy.com/v1/wallet/transactions' \
  -H 'Content-Type: application/json' \
  -d '{
    "wallet_card_id": 0,
    "wallet_account_id": 0,
    "addon_id": 0,
    "addon_install_id": 0,
    "payee_name": "string",
    "amount": 0
  }'
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "wallet_card_id": 0,
      "wallet_account_id": 0,
      "addon_id": 0,
      "addon_install_id": 0,
      "payee_name": "string",
      "amount": 0
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "wallet_card_id": 0,
      "wallet_account_id": 0,
      "addon_id": 0,
      "addon_install_id": 0,
      "payee_name": "string",
      "amount": 0
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "amount": 0
}

response = requests.post('https://api.mytommy.com/v1/wallet/transactions', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/transactions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "wallet_card_id": 0,
    "wallet_account_id": 0,
    "addon_id": 0,
    "addon_install_id": 0,
    "payee_name": "string",
    "amount": 0
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "wallet_card_id": 0,
    "wallet_account_id": 0,
    "addon_id": 0,
    "addon_install_id": 0,
    "payee_name": "string",
    "amount": 0
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/wallet/transactions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "amount": 0
}
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "icon_url": "string",
  "invoice_url": "string",
  "status": "active",
  "amount": 0,
  "vendor_reference": "string"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a wallet transaction

GET
https://api.mytommy.com/v1/wallet/transactions/{id}

Get a wallet transaction by ID.

Parameters

idinteger<int64>requiredpath

WalletTransaction id

Response

200OKobject

WalletTransaction response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a wallet transaction
curl -X GET 'https://api.mytommy.com/v1/wallet/transactions/{id}'
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/wallet/transactions/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/transactions/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/wallet/transactions/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "icon_url": "string",
  "invoice_url": "string",
  "status": "active",
  "amount": 0,
  "vendor_reference": "string"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Refund a wallet transaction

POST
https://api.mytommy.com/v1/wallet/transactions/{id}/refund

Refund a wallet transaction by ID.

Parameters

idinteger<int64>requiredpath

WalletTransaction id

Response

200OKobject

WalletTransaction response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Refund a wallet transaction
curl -X POST 'https://api.mytommy.com/v1/wallet/transactions/{id}/refund'
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions/{id}/refund', {
  method: 'POST',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/wallet/transactions/{id}/refund', {
  method: 'POST',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.post('https://api.mytommy.com/v1/wallet/transactions/{id}/refund')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/wallet/transactions/{id}/refund')
request = Net::HTTP::Post.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/wallet/transactions/{id}/refund", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "icon_url": "string",
  "invoice_url": "string",
  "status": "active",
  "amount": 0,
  "vendor_reference": "string"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Vendor

Vendor catalogs, products, and orders.

Get vendor orders

GET
https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders

Get all vendor orders.

Parameters

vendor_team_idstringrequiredpath

Team team_id

Response

200OKArray<object>

VendorOrder response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get vendor orders
curl -X GET 'https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders'
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "user_id": 0,
    "team_id": 0,
    "assignee_id": 0,
    "event_id": 0,
    "wallet_transaction_id": 0,
    "workforce_shift_id": 0,
    "coupon_ids": [
      0
    ],
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {}
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create an vendor order

POST
https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders

Create an vendor order

Body

application/json

VendorOrderInput request

Object for creating or updating an VendorOrder.

assignee_idinteger<int64>
assignee_team_idinteger<int64>
namestring

Display name

statusstring

Current status

canceledboolean
dataobject
event_attributesobject

Object for creating or updating an Event.

Show child attributes
kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>
coupon_idsArray<integer>

Array coupon IDs.

order_items_attributesArray<object>
Show child attributes
orderable_idinteger<int64>
orderable_typestring
quantityinteger<int64>

Parameters

vendor_team_idstringrequiredpath

Team team_id

Response

201Createdobject

VendorOrder response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create an vendor order
curl -X POST 'https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders' \
  -H 'Content-Type: application/json' \
  -d '{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "assignee_id": 0,
      "assignee_team_id": 0,
      "name": "Example Name",
      "status": "active",
      "canceled": true,
      "data": {},
      "event_attributes": {
        "kind": "string",
        "title": "Example Title",
        "details": "string",
        "location_name": "string",
        "color": "string",
        "start_at": "2024-01-15T09:30:00Z",
        "end_at": "2024-01-15T09:30:00Z"
      },
      "coupon_ids": [
        0
      ],
      "order_items_attributes": [
        {
          "orderable_id": 0,
          "orderable_type": "string",
          "quantity": 0
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "assignee_id": 0,
      "assignee_team_id": 0,
      "name": "Example Name",
      "status": "active",
      "canceled": true,
      "data": {},
      "event_attributes": {
        "kind": "string",
        "title": "Example Title",
        "details": "string",
        "location_name": "string",
        "color": "string",
        "start_at": "2024-01-15T09:30:00Z",
        "end_at": "2024-01-15T09:30:00Z"
      },
      "coupon_ids": [
        0
      ],
      "order_items_attributes": [
        {
          "orderable_id": 0,
          "orderable_type": "string",
          "quantity": 0
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "assignee_id": 0,
  "assignee_team_id": 0,
  "name": "Example Name",
  "status": "active",
  "canceled": True,
  "data": {},
  "event_attributes": {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  },
  "coupon_ids": [
    0
  ],
  "order_items_attributes": [
    {
      "orderable_id": 0,
      "orderable_type": "string",
      "quantity": 0
    }
  ]
}

response = requests.post('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "assignee_id": 0,
  "assignee_team_id": 0,
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {},
  "event_attributes": {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  },
  "coupon_ids": [
    0
  ],
  "order_items_attributes": [
    {
      "orderable_id": 0,
      "orderable_type": "string",
      "quantity": 0
    }
  ]
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "wallet_transaction_id": 0,
  "workforce_shift_id": 0,
  "coupon_ids": [
    0
  ],
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get an vendor order

GET
https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}

Get an vendor order object.

Parameters

vendor_team_idstringrequiredpath

Team team_id

idinteger<int64>requiredpath

VendorOrder id

Response

200OKobject

VendorOrder response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get an vendor order
curl -X GET 'https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}'
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "wallet_transaction_id": 0,
  "workforce_shift_id": 0,
  "coupon_ids": [
    0
  ],
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Update an vendor order

PUT
https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}

Update an vendor order object.

Body

application/json

VendorOrderInput request

Object for creating or updating an VendorOrder.

assignee_idinteger<int64>
assignee_team_idinteger<int64>
namestring

Display name

statusstring

Current status

canceledboolean
dataobject
event_attributesobject

Object for creating or updating an Event.

Show child attributes
kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>
coupon_idsArray<integer>

Array coupon IDs.

order_items_attributesArray<object>
Show child attributes
orderable_idinteger<int64>
orderable_typestring
quantityinteger<int64>

Parameters

vendor_team_idstringrequiredpath

Team team_id

idinteger<int64>requiredpath

VendorOrder id

Response

200OKobject

VendorOrder response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Update an vendor order
curl -X PUT 'https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }'
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "assignee_id": 0,
      "assignee_team_id": 0,
      "name": "Example Name",
      "status": "active",
      "canceled": true,
      "data": {},
      "event_attributes": {
        "kind": "string",
        "title": "Example Title",
        "details": "string",
        "location_name": "string",
        "color": "string",
        "start_at": "2024-01-15T09:30:00Z",
        "end_at": "2024-01-15T09:30:00Z"
      },
      "coupon_ids": [
        0
      ],
      "order_items_attributes": [
        {
          "orderable_id": 0,
          "orderable_type": "string",
          "quantity": 0
        }
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "assignee_id": 0,
      "assignee_team_id": 0,
      "name": "Example Name",
      "status": "active",
      "canceled": true,
      "data": {},
      "event_attributes": {
        "kind": "string",
        "title": "Example Title",
        "details": "string",
        "location_name": "string",
        "color": "string",
        "start_at": "2024-01-15T09:30:00Z",
        "end_at": "2024-01-15T09:30:00Z"
      },
      "coupon_ids": [
        0
      ],
      "order_items_attributes": [
        {
          "orderable_id": 0,
          "orderable_type": "string",
          "quantity": 0
        }
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "assignee_id": 0,
  "assignee_team_id": 0,
  "name": "Example Name",
  "status": "active",
  "canceled": True,
  "data": {},
  "event_attributes": {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  },
  "coupon_ids": [
    0
  ],
  "order_items_attributes": [
    {
      "orderable_id": 0,
      "orderable_type": "string",
      "quantity": 0
    }
  ]
}

response = requests.put('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}')
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "assignee_id": 0,
    "assignee_team_id": 0,
    "name": "Example Name",
    "status": "active",
    "canceled": true,
    "data": {},
    "event_attributes": {
      "kind": "string",
      "title": "Example Title",
      "details": "string",
      "location_name": "string",
      "color": "string",
      "start_at": "2024-01-15T09:30:00Z",
      "end_at": "2024-01-15T09:30:00Z"
    },
    "coupon_ids": [
      0
    ],
    "order_items_attributes": [
      {
        "orderable_id": 0,
        "orderable_type": "string",
        "quantity": 0
      }
    ]
  }`)
  req, _ := http.NewRequest("PUT", "https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "assignee_id": 0,
  "assignee_team_id": 0,
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {},
  "event_attributes": {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  },
  "coupon_ids": [
    0
  ],
  "order_items_attributes": [
    {
      "orderable_id": 0,
      "orderable_type": "string",
      "quantity": 0
    }
  ]
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "wallet_transaction_id": 0,
  "workforce_shift_id": 0,
  "coupon_ids": [
    0
  ],
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Cancel an vendor order

DELETE
https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}

Cancel an vendor order object.

Parameters

vendor_team_idstringrequiredpath

Team team_id

idinteger<int64>requiredpath

VendorOrder id

Response

200OKobject

VendorOrder response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Cancel an vendor order
curl -X DELETE 'https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}'
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/vendors/{vendor_team_id}/orders/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "wallet_transaction_id": 0,
  "workforce_shift_id": 0,
  "coupon_ids": [
    0
  ],
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {}
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Device

Device registration and device actions.

Register a device

POST
https://api.mytommy.com/v1/devices

Register a mobile device for push notifications.

Body

application/json

Device request

User device

idinteger<int64>

Unique device identifier

user_idinteger<int64>required
platformstringiosandroidrequired

Device platform type

environmentstringdevelopmentproduction

Device build environment

uuidstringrequired

Device UUID

tokenstring

Device token

Response

200OKobject

Device response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Register a device
curl -X POST 'https://api.mytommy.com/v1/devices' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 444,
    "user_id": 0,
    "platform": "ios",
    "environment": "development",
    "uuid": "string",
    "token": "xxxx-yyyy-zzzz"
  }'
const response = await fetch('https://api.mytommy.com/v1/devices', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 444,
      "user_id": 0,
      "platform": "ios",
      "environment": "development",
      "uuid": "string",
      "token": "xxxx-yyyy-zzzz"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/devices', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "id": 444,
      "user_id": 0,
      "platform": "ios",
      "environment": "development",
      "uuid": "string",
      "token": "xxxx-yyyy-zzzz"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "id": 444,
  "user_id": 0,
  "platform": "ios",
  "environment": "development",
  "uuid": "string",
  "token": "xxxx-yyyy-zzzz"
}

response = requests.post('https://api.mytommy.com/v1/devices', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/devices')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "id": 444,
    "user_id": 0,
    "platform": "ios",
    "environment": "development",
    "uuid": "string",
    "token": "xxxx-yyyy-zzzz"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "id": 444,
    "user_id": 0,
    "platform": "ios",
    "environment": "development",
    "uuid": "string",
    "token": "xxxx-yyyy-zzzz"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/devices", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "id": 444,
  "user_id": 0,
  "platform": "ios",
  "environment": "development",
  "uuid": "string",
  "token": "xxxx-yyyy-zzzz"
}
{
  "id": 444,
  "user_id": 0,
  "platform": "ios",
  "environment": "development",
  "uuid": "string",
  "token": "xxxx-yyyy-zzzz"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a device

DELETE
https://api.mytommy.com/v1/devices/{id}

Delete a mobile device.

Parameters

idinteger<int64>requiredpath

Device ID

Response

200OK

Success response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a device
curl -X DELETE 'https://api.mytommy.com/v1/devices/{id}'
const response = await fetch('https://api.mytommy.com/v1/devices/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/devices/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/devices/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/devices/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/devices/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Tag

Tagging resources for organization.

Get tags

GET
https://api.mytommy.com/v1/tags

Get all tags.

Response

200OKArray<object>

Tag response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get tags
curl -X GET 'https://api.mytommy.com/v1/tags'
const response = await fetch('https://api.mytommy.com/v1/tags', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/tags', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/tags')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/tags')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/tags", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 555,
    "name": "priority",
    "taggings_count": 0
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Create a tag

POST
https://api.mytommy.com/v1/tags

Create a tag

Body

application/json

TaggingInput request

Object for creating a Tagging.

contextstringmemberstagsroleslocations

Tagging type

namestring

Display name

Response

201Created

Null response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

422Unprocessable Entityany

Validation error

500Internal Server Errorany

Internal error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Create a tag
curl -X POST 'https://api.mytommy.com/v1/tags' \
  -H 'Content-Type: application/json' \
  -d '{
    "context": "members",
    "name": "Example Name"
  }'
const response = await fetch('https://api.mytommy.com/v1/tags', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "context": "members",
      "name": "Example Name"
    }),
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/tags', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "context": "members",
      "name": "Example Name"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "context": "members",
  "name": "Example Name"
}

response = requests.post('https://api.mytommy.com/v1/tags', json=payload)
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/tags')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "context": "members",
    "name": "Example Name"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  body := strings.NewReader(`{
    "context": "members",
    "name": "Example Name"
  }`)
  req, _ := http.NewRequest("POST", "https://api.mytommy.com/v1/tags", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
Request Body
{
  "context": "members",
  "name": "Example Name"
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get a tag

GET
https://api.mytommy.com/v1/tags/{id}

Get a tag object.

Parameters

idinteger<int64>requiredpath

Tag id

Response

200OKobject

Tag response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get a tag
curl -X GET 'https://api.mytommy.com/v1/tags/{id}'
const response = await fetch('https://api.mytommy.com/v1/tags/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/tags/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/tags/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/tags/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/tags/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 555,
  "name": "priority",
  "taggings_count": 0
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Delete a tag

DELETE
https://api.mytommy.com/v1/tags/{id}

Delete a tag object.

Parameters

idinteger<int64>requiredpath

Tag id

Response

200OK

Null response

401Unauthorizedany

Unauthorized

403Forbiddenany

Forbidden

500Internal Server Errorany

Internal error

defaultany

Unexpected error

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Delete a tag
curl -X DELETE 'https://api.mytommy.com/v1/tags/{id}'
const response = await fetch('https://api.mytommy.com/v1/tags/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/tags/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://api.mytommy.com/v1/tags/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/tags/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("DELETE", "https://api.mytommy.com/v1/tags/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Syncs

Synchronization endpoints and statuses.

List syncs

GET
https://api.mytommy.com/v1/syncs

Get a paginated list of sync operations for the current team.

Parameters

pageinteger<int32>query

Page number for pagination

perinteger<int32>query

Number of items per page

Response

200OKArray<object>

Syncs retrieved successfully

401Unauthorizedany

Unauthorized

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

List syncs
curl -X GET 'https://api.mytommy.com/v1/syncs'
const response = await fetch('https://api.mytommy.com/v1/syncs', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/syncs', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/syncs')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/syncs')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/syncs", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
[
  {
    "id": 123,
    "team_id": 0,
    "user_id": 0,
    "integration_id": 0,
    "status": "active",
    "direction": "import",
    "item_type": "string",
    "progress_percentage": 0,
    "total_items": 0,
    "success_items": 0,
    "failed_items": 0,
    "options": {},
    "message": "string",
    "started_at": "2024-01-15T09:30:00Z",
    "ended_at": "2024-01-15T09:30:00Z",
    "created_at": "2025-01-01T12:00:00.000Z",
    "updated_at": "2025-01-02T12:00:00.000Z",
    "user": {
      "id": 0,
      "name": "string",
      "email": "string"
    }
  }
]
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Get sync details

GET
https://api.mytommy.com/v1/syncs/{id}

Get detailed information about a specific sync operation.

Parameters

idinteger<int64>requiredpath

ID of the sync to retrieve

Response

200OKobject

Sync details retrieved successfully

401Unauthorizedany

Unauthorized

404Not Foundany

Not Found

Authorization

api_keyapiKey in header

Provide your API key via the api_key header.

Get sync details
curl -X GET 'https://api.mytommy.com/v1/syncs/{id}'
const response = await fetch('https://api.mytommy.com/v1/syncs/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://api.mytommy.com/v1/syncs/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://api.mytommy.com/v1/syncs/{id}')
data = response.json()
require 'net/http'
require 'json'

uri = URI('https://api.mytommy.com/v1/syncs/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://api.mytommy.com/v1/syncs/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
{
  "id": 123,
  "team_id": 0,
  "user_id": 0,
  "integration_id": 0,
  "status": "active",
  "direction": "import",
  "item_type": "string",
  "progress_percentage": 0,
  "total_items": 0,
  "success_items": 0,
  "failed_items": 0,
  "options": {},
  "message": "string",
  "started_at": "2024-01-15T09:30:00Z",
  "ended_at": "2024-01-15T09:30:00Z",
  "created_at": "2025-01-01T12:00:00.000Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "user": {
    "id": 0,
    "name": "string",
    "email": "string"
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

Models

Account

object

A representation of a Account

idinteger<int64>

Unique account identifier

typestring
user_idinteger<int64>
team_idinteger<int64>
namestring

Account display name

contact_namestring
kindstring
icon_urlstring
mobilestring
notification_countinteger<int64>
Example
{
  "id": 111,
  "type": "string",
  "user_id": 0,
  "team_id": 0,
  "name": "Acme Corp",
  "contact_name": "string",
  "kind": "string",
  "icon_url": "string",
  "mobile": "string",
  "notification_count": 0
}

AttachmentInput

string

Object for creating or updating an Attachment.

Example
"<binary>"

Attachment

object

Object that represents an Attachment.

signed_idstring
content_typestring
filenamestring
urlstring
Example
{
  "signed_id": "string",
  "content_type": "string",
  "filename": "string",
  "url": "string"
}

User

object

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

Example
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png"
}

UserInput

object

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

photostring<binary>
passwordstring
Example
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "photo": "<binary>",
  "password": "string"
}

UserID

object

User ID parameter

user_idinteger<int64>
Example
{
  "user_id": 0
}

Team

object

A representation of a Team

idinteger<int64>required

Unique team identifier

user_idinteger<int64>required

Owner user ID

namestringrequired

Team display name

photostring<binary>
icon_urlstring

Team icon URL

emailstring
phonestring
statusstring

Current status

slugstring
featuresobject

Feature flags enabled for the team

Show child attributes
complianceboolean
timesheetsboolean
timeclockboolean
availabilityboolean
ordersboolean
clientsboolean
trainingboolean
leaveboolean
documentsboolean
schedulingboolean
ndisboolean
experimentalboolean
mileageboolean
Example
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}

TeamFeatures

object

Feature flags enabled for the team

complianceboolean
timesheetsboolean
timeclockboolean
availabilityboolean
ordersboolean
clientsboolean
trainingboolean
leaveboolean
documentsboolean
schedulingboolean
ndisboolean
experimentalboolean
mileageboolean
Example
{
  "compliance": true,
  "timesheets": true,
  "timeclock": true,
  "availability": true,
  "orders": true,
  "clients": true,
  "training": true,
  "leave": true,
  "documents": true,
  "scheduling": true,
  "ndis": true,
  "experimental": true,
  "mileage": true
}

TeamInput

object

A representation of a Team

idinteger<int64>required

Unique team identifier

user_idinteger<int64>required

Owner user ID

namestringrequired

Team display name

photostring<binary>
icon_urlstring

Team icon URL

emailstring
phonestring
statusstring

Current status

slugstring
featuresobject

Feature flags enabled for the team

Show child attributes
complianceboolean
timesheetsboolean
timeclockboolean
availabilityboolean
ordersboolean
clientsboolean
trainingboolean
leaveboolean
documentsboolean
schedulingboolean
ndisboolean
experimentalboolean
mileageboolean
Example
{
  "id": 9876,
  "user_id": 12345,
  "name": "Operations",
  "photo": "<binary>",
  "icon_url": "https://cdn.example.com/teams/ops.png",
  "email": "string",
  "phone": "string",
  "status": "active",
  "slug": "string",
  "features": {
    "compliance": true,
    "timesheets": true,
    "timeclock": true,
    "availability": true,
    "orders": true,
    "clients": true,
    "training": true,
    "leave": true,
    "documents": true,
    "scheduling": true,
    "ndis": true,
    "experimental": true,
    "mileage": true
  }
}

TeamID

object
team_idinteger<int64>
Example
{
  "team_id": 0
}

TeamIDs

object
team_idsArray<integer>
Example
{
  "team_ids": [
    0
  ]
}

TeamMemberInput

object

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

Example
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ]
}

TeamMember

object

Object that represents a Team Member

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
first_namestring
last_namestring
emailstring
mobilestring
managerboolean
memberboolean

True when the team member has signed up to Tommy

statusstring
icon_urlstring
addon_linksArray<any>

Array of profile links accessible by the current User on the Team Member profile

Show child attributes
titlestring

Human-friendly title

packagestring
urlstring
icon_urlstring
Example
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}

DeveloperInput

object

Object representing a Tommy developer

namestring

Display name

detailsstring
Example
{
  "name": "Example Name",
  "details": "string"
}

Developer

object

Object representing a Tommy developer

namestring

Display name

detailsstring
icon_urlstring
addonsArray<any>
Show child attributes
idinteger<int64>required

Unique identifier

user_idinteger<int64>required
developer_idinteger<int64>
packagestringrequired
titlestring

Human-friendly title

authorstring
environmentstring
versionstring
descriptionstring

Human-friendly description

homepagestring
icon_urlstring
file_base_urlstring
installedboolean
updated_atstring<date-time>

Last update timestamp (ISO8601)

rolesArray<string>

Array of roles required to install this addon.

permissionsArray<object>
input_devicesArray<object>
localesArray<string>
viewsArray<any>
Show child attributes
idstring

Unique identifier

titlestring

Human-friendly title

typestring
pathstring
indexboolean
icon_urlstring
actionsArray<any>
Show child attributes
idinteger<int64>

Unique identifier

user_idinteger<int64>
developer_idinteger<int64>
action_version_idinteger<int64>
authorstring
triggerany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

activityany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

dependenciesobject
namestring

Display name

summarystring
descriptionstring

Human-friendly description

icon_urlstring
installedboolean
kindstring
uniqueboolean
solutionsArray<any>
Show child attributes
idinteger<int64>

Unique identifier

user_idinteger<int64>
developer_idinteger<int64>
namestring

Display name

summarystring
descriptionstring

Human-friendly description

Example
{
  "name": "Example Name",
  "details": "string",
  "icon_url": "string",
  "addons": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "package": "string",
      "title": "Example Title",
      "author": "string",
      "environment": "string",
      "version": "string",
      "description": "Short description",
      "homepage": "string",
      "icon_url": "string",
      "file_base_url": "string",
      "installed": true,
      "updated_at": "2025-01-02T12:00:00.000Z",
      "roles": [
        "string"
      ],
      "permissions": [
        {}
      ],
      "input_devices": [
        {}
      ],
      "locales": [
        "string"
      ],
      "views": [
        {
          "id": 123,
          "title": "Example Title",
          "type": "string",
          "path": "string",
          "index": true,
          "icon_url": "string"
        }
      ]
    }
  ],
  "actions": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "action_version_id": 0,
      "author": "string",
      "trigger": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "activity": {
        "id": 123,
        "action_version_id": 0,
        "name": "Example Name",
        "description": "Short description"
      },
      "dependencies": {},
      "name": "Example Name",
      "summary": "string",
      "description": "Short description",
      "icon_url": "string",
      "installed": true,
      "kind": "string",
      "unique": true
    }
  ],
  "solutions": [
    {
      "id": 123,
      "user_id": 0,
      "developer_id": 0,
      "name": "Example Name",
      "summary": "string",
      "description": "Short description"
    }
  ]
}

Solution

object
idinteger<int64>

Unique identifier

user_idinteger<int64>
developer_idinteger<int64>
namestring

Display name

summarystring
descriptionstring

Human-friendly description

Example
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "name": "Example Name",
  "summary": "string",
  "description": "Short description"
}

Chat

object

A representation of a Chat

idinteger<int64>

Unique chat identifier

user_idinteger<int64>

The user ID of the chat owner.

team_idinteger<int64>

The team ID.

titlestring

The chat room title.

groupboolean
favoriteboolean
muteboolean
unread_messages_countinteger<int64>
usersArray<any>
Show child attributes
idinteger<int64>

Unique identifier

chat_idinteger<int64>required
user_idinteger<int64>required
first_namestring
last_namestring
icon_urlstring
deletedboolean
Example
{
  "id": 222,
  "user_id": 0,
  "team_id": 0,
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "unread_messages_count": 0,
  "users": [
    {
      "id": 123,
      "chat_id": 0,
      "user_id": 0,
      "first_name": "string",
      "last_name": "string",
      "icon_url": "string",
      "deleted": true
    }
  ]
}

ChatInput

object
titlestring

The chat room title.

groupboolean
favoriteboolean
muteboolean
user_idsArray<integer>
Example
{
  "title": "Example Title",
  "group": true,
  "favorite": true,
  "mute": true,
  "user_ids": [
    0
  ]
}

ChatInitiateInput

object

Array of user IDs to initiate the chat with.

user_idsArray<integer>required
Example
{
  "user_ids": [
    0
  ]
}

ChatUser

object
idinteger<int64>

Unique identifier

chat_idinteger<int64>required
user_idinteger<int64>required
first_namestring
last_namestring
icon_urlstring
deletedboolean
Example
{
  "id": 123,
  "chat_id": 0,
  "user_id": 0,
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "deleted": true
}

MessageFlag

object
idinteger<int64>

Unique identifier

user_idinteger<int64>
message_idinteger<int64>
chat_idinteger<int64>
kindstring

The type of flag (read, reaction, etc.)

valuestring

The reaction emoji value

created_atstring<date-time>

Creation timestamp (ISO8601)

updated_atstring<date-time>

Last update timestamp (ISO8601)

Example
{
  "id": 123,
  "user_id": 0,
  "message_id": 0,
  "chat_id": 0,
  "kind": "string",
  "value": "string",
  "created_at": "2025-01-01T12:00:00.000Z",
  "updated_at": "2025-01-02T12:00:00.000Z"
}

ReactionInput

object
message_idinteger<int64>required

The message ID to react to

valuestringrequired

The reaction emoji value

Example
{
  "message_id": 0,
  "value": "string"
}

MessageInput

object
chat_idinteger<int64>
sender_idinteger<int64>required
bodystringrequired
kindstring
send_atstring<date-time>

Time in the future to send the message

attachmentsArray<string>
Show child attributes
Example
{
  "chat_id": 0,
  "sender_id": 0,
  "body": "string",
  "kind": "string",
  "send_at": "2024-01-15T09:30:00Z",
  "attachments": [
    "<binary>"
  ]
}

Message

object

A representation of a Message

idinteger<int64>

Unique message identifier

chat_idinteger<int64>

Associated chat ID

sender_idinteger<int64>
bodystring

Message contents

kindstring
chat_titlestring
sender_first_namestring
sender_last_namestring
sender_icon_urlstring
sent_atstring<date-time>
attachmentsArray<any>
Show child attributes

Object that represents an Attachment.

signed_idstring
content_typestring
filenamestring
urlstring
Example
{
  "id": 333,
  "chat_id": 222,
  "sender_id": 0,
  "body": "Hello world",
  "kind": "string",
  "chat_title": "string",
  "sender_first_name": "string",
  "sender_last_name": "string",
  "sender_icon_url": "string",
  "sent_at": "2024-01-15T09:30:00Z",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}

AddonView

object
idstring

Unique identifier

titlestring

Human-friendly title

typestring
pathstring
indexboolean
icon_urlstring
Example
{
  "id": 123,
  "title": "Example Title",
  "type": "string",
  "path": "string",
  "index": true,
  "icon_url": "string"
}

Addon

object
idinteger<int64>required

Unique identifier

user_idinteger<int64>required
developer_idinteger<int64>
packagestringrequired
titlestring

Human-friendly title

authorstring
environmentstring
versionstring
descriptionstring

Human-friendly description

homepagestring
icon_urlstring
file_base_urlstring
installedboolean
updated_atstring<date-time>

Last update timestamp (ISO8601)

rolesArray<string>

Array of roles required to install this addon.

permissionsArray<object>
input_devicesArray<object>
localesArray<string>
viewsArray<any>
Show child attributes
idstring

Unique identifier

titlestring

Human-friendly title

typestring
pathstring
indexboolean
icon_urlstring
Example
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "package": "string",
  "title": "Example Title",
  "author": "string",
  "environment": "string",
  "version": "string",
  "description": "Short description",
  "homepage": "string",
  "icon_url": "string",
  "file_base_url": "string",
  "installed": true,
  "updated_at": "2025-01-02T12:00:00.000Z",
  "roles": [
    "string"
  ],
  "permissions": [
    {}
  ],
  "input_devices": [
    {}
  ],
  "locales": [
    "string"
  ],
  "views": [
    {
      "id": 123,
      "title": "Example Title",
      "type": "string",
      "path": "string",
      "index": true,
      "icon_url": "string"
    }
  ]
}

AuditLog

object
user_idinteger<int64>
team_idinteger<int64>
namestring

Display name

messagestring
Example
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "message": "string"
}

Activity

object
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

Example
{
  "id": 123,
  "action_version_id": 0,
  "name": "Example Name",
  "description": "Short description"
}

Trigger

object
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

Example
{
  "id": 123,
  "action_version_id": 0,
  "name": "Example Name",
  "description": "Short description"
}

Action

object
idinteger<int64>

Unique identifier

user_idinteger<int64>
developer_idinteger<int64>
action_version_idinteger<int64>
authorstring
triggerany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

activityany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

dependenciesobject
namestring

Display name

summarystring
descriptionstring

Human-friendly description

icon_urlstring
installedboolean
kindstring
uniqueboolean
Example
{
  "id": 123,
  "user_id": 0,
  "developer_id": 0,
  "action_version_id": 0,
  "author": "string",
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "dependencies": {},
  "name": "Example Name",
  "summary": "string",
  "description": "Short description",
  "icon_url": "string",
  "installed": true,
  "kind": "string",
  "unique": true
}

ActionInstall

object
idinteger<int64>

Unique identifier

action_idinteger<int64>
addon_install_idinteger<int64>
titlestring

Human-friendly title

summarystring
descriptionstring

Human-friendly description

scheduleobject
installedboolean
deleted_atstring<date-time>
updated_atstring<date-time>

Last update timestamp (ISO8601)

tag_idsArray<integer>
tags_listArray<string>
triggerany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

activityany
Show child attributes
idinteger<int64>

Unique identifier

action_version_idinteger<int64>
namestring

Display name

descriptionstring

Human-friendly description

settingsobject
Example
{
  "id": 123,
  "action_id": 0,
  "addon_install_id": 0,
  "title": "Example Title",
  "summary": "string",
  "description": "Short description",
  "schedule": {},
  "installed": true,
  "deleted_at": "2024-01-15T09:30:00Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "tag_ids": [
    0
  ],
  "tags_list": [
    "string"
  ],
  "trigger": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "activity": {
    "id": 123,
    "action_version_id": 0,
    "name": "Example Name",
    "description": "Short description"
  },
  "settings": {}
}

TriggerData

object
trigger_dataobject

Trigger data object

Example
{
  "trigger_data": {}
}

Setting

object
user_idinteger<int64>
team_idinteger<int64>
addon_install_idinteger<int64>
resource_idinteger<int64>
resource_typestring
contextstring
formatstring
dataobjectrequired

Setting data as JSON.

Example
{
  "user_id": 0,
  "team_id": 0,
  "addon_install_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "context": "string",
  "format": "string",
  "data": {}
}

SettingData

object
dataobjectrequired

Setting data as JSON, boolean, integer or string.

contextstring
_formatstring
Example
{
  "data": {},
  "context": "string",
  "_format": "string"
}

FragmentInput

object

Object for creating or updating an Fragment.

kindstring
namestring

Display name

datastring
timestring<date-time>
parent_idinteger<int64>
attachmentsArray<string>
Show child attributes
Example
{
  "kind": "string",
  "name": "Example Name",
  "data": "string",
  "time": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "attachments": [
    "<binary>"
  ]
}

Fragment

object

Object that represents an Fragment.

idinteger<int64>

Unique identifier

user_idinteger<int64>required
team_idinteger<int64>
addons_install_idinteger<int64>
kindstring
namestring

Display name

dataobject
start_atstring<date-time>
end_atstring<date-time>
parent_idinteger<int64>
resource_idinteger<int64>
resource_typestring
attachmentsArray<any>
Show child attributes

Object that represents an Attachment.

signed_idstring
content_typestring
filenamestring
urlstring
Example
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0,
  "kind": "string",
  "name": "Example Name",
  "data": {},
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "parent_id": 0,
  "resource_id": 0,
  "resource_type": "string",
  "attachments": [
    {
      "signed_id": "string",
      "content_type": "string",
      "filename": "string",
      "url": "string"
    }
  ]
}

ContactInput

object

A representation of a Contact

friend_idinteger<int64>required

Friend user ID

favoriteboolean
muteboolean
personalboolean
rolesArray<string>

Array of roles assigned to the Contact

locationsArray<string>

Array of locations assigned to the Contact

tagsArray<string>

Array of tags assigned to the Contact

Example
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ]
}

Contact

object

A representation of a Contact

friend_idinteger<int64>required

Friend user ID

favoriteboolean
muteboolean
personalboolean
rolesArray<string>

Array of roles assigned to the Contact

locationsArray<string>

Array of locations assigned to the Contact

tagsArray<string>

Array of tags assigned to the Contact

idinteger<int64>
typestring
first_namestring
last_namestring
icon_urlstring
emailstring
mobilestring
statusstring
memberboolean

True when the friend has signed up to Tommy

last_online_atstring<date-time>
Example
{
  "friend_id": 0,
  "favorite": true,
  "mute": true,
  "personal": true,
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "type": "string",
  "first_name": "string",
  "last_name": "string",
  "icon_url": "string",
  "email": "string",
  "mobile": "string",
  "status": "string",
  "member": true,
  "last_online_at": "2024-01-15T09:30:00Z"
}

ContactRequest

object

A representation of a User

idinteger<int64>

Unique user identifier

statusstring

Current account status

first_namestring

Given name

last_namestring

Family name

slugstring

URL-safe identifier

emailstring

Email address

mobilestring

Mobile phone number in E.164 format

dobstring

Date of birth (YYYY-MM-DD)

localestring

IETF language tag

icon_urlstring

Avatar image URL

team_idsArray<integer>
viastring
Example
{
  "id": 12345,
  "status": "active",
  "first_name": "Alex",
  "last_name": "Johnson",
  "slug": "alex-johnson",
  "email": "alex@example.com",
  "mobile": "+15551234567",
  "dob": "1990-01-01T00:00:00.000Z",
  "locale": "en-US",
  "icon_url": "https://cdn.example.com/avatars/12345.png",
  "team_ids": [
    0
  ],
  "via": "string"
}

InvitationInput

object

Object for creating an Invitation.

friend_idinteger<int64>
invitee_idinteger<int64>
invitee_typestring
messagestring
Example
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string"
}

Invitation

object

Invitation for a user to join Tommy

Object for creating an Invitation.

friend_idinteger<int64>
invitee_idinteger<int64>
invitee_typestring
messagestring
user_idinteger<int64>
team_idinteger<int64>
inviterany

A representation of a Account

Show child attributes
idinteger<int64>

Unique account identifier

typestring
user_idinteger<int64>
team_idinteger<int64>
namestring

Account display name

contact_namestring
kindstring
icon_urlstring
mobilestring
notification_countinteger<int64>
inviteeany

A representation of a Account

Show child attributes
idinteger<int64>

Unique account identifier

typestring
user_idinteger<int64>
team_idinteger<int64>
namestring

Account display name

contact_namestring
kindstring
icon_urlstring
mobilestring
notification_countinteger<int64>
contactobject & any
Show child attributes
friend_idinteger<int64>required

Friend user ID

favoriteboolean
muteboolean
personalboolean
rolesArray<string>

Array of roles assigned to the Contact

locationsArray<string>

Array of locations assigned to the Contact

tagsArray<string>

Array of tags assigned to the Contact

idinteger<int64>
typestring
first_namestring
last_namestring
icon_urlstring
emailstring
mobilestring
statusstring
memberboolean

True when the friend has signed up to Tommy

last_online_atstring<date-time>
tokenstring
statusstring
linkstring
times_sentinteger<int64>
sent_atstring<date-time>
accepted_atstring<date-time>
Example
{
  "friend_id": 0,
  "invitee_id": 0,
  "invitee_type": "string",
  "message": "string",
  "user_id": 0,
  "team_id": 0,
  "inviter": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "invitee": {
    "id": 111,
    "type": "string",
    "user_id": 0,
    "team_id": 0,
    "name": "Acme Corp",
    "contact_name": "string",
    "kind": "string",
    "icon_url": "string",
    "mobile": "string",
    "notification_count": 0
  },
  "contact": {
    "friend_id": 0,
    "favorite": true,
    "mute": true,
    "personal": true,
    "roles": [
      "string"
    ],
    "locations": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "id": 0,
    "type": "string",
    "first_name": "string",
    "last_name": "string",
    "icon_url": "string",
    "email": "string",
    "mobile": "string",
    "status": "string",
    "member": true,
    "last_online_at": "2024-01-15T09:30:00Z"
  },
  "token": "string",
  "status": "string",
  "link": "string",
  "times_sent": 0,
  "sent_at": "2024-01-15T09:30:00Z",
  "accepted_at": "2024-01-15T09:30:00Z"
}

EventInput

object

Object for creating or updating an Event.

kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>
Example
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z"
}

Event

object

Object that represents an Event.

Object for creating or updating an Event.

kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>
idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
addons_install_idinteger<int64>
Example
{
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "location_name": "string",
  "color": "string",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}

UserCredentials

object

User login credentials

loginstringrequired
passwordstringrequired
Example
{
  "login": "string",
  "password": "string"
}

Permission

object
user_idinteger<int64>
team_idinteger<int64>
namestring

Display name

titlestring

Human-friendly title

hintstring
resource_typestring
resource_kindstring
operationsArray<string>

Array of permissable operations

Example
{
  "user_id": 0,
  "team_id": 0,
  "name": "Example Name",
  "title": "Example Title",
  "hint": "string",
  "resource_type": "string",
  "resource_kind": "string",
  "operations": [
    "string"
  ]
}

GeolocationInput

object

Object for creating or updating an Geolocation.

latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
timestampstring<date-time>
kindstring
titlestring

Human-friendly title

detailsstring
Example
{
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "timestamp": "2024-01-15T09:30:00Z",
  "kind": "string",
  "title": "Example Title",
  "details": "string"
}

Geolocation

object

Object that represents an Geolocation.

Object for creating or updating an Geolocation.

latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
timestampstring<date-time>
kindstring
titlestring

Human-friendly title

detailsstring
idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
addons_install_idinteger<int64>
Example
{
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "timestamp": "2024-01-15T09:30:00Z",
  "kind": "string",
  "title": "Example Title",
  "details": "string",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "addons_install_id": 0
}

WalletInput

object

Object for updating a Wallet

enable_notificationsboolean
show_balanceboolean
Example
{
  "enable_notifications": true,
  "show_balance": true
}

Wallet

object

Object representing a Wallet

idinteger<int64>

Unique identifier

user_idinteger<int64>
balancenumber<double>

Current wallet balance (cents or minor units unless noted)

credit_limitnumber<double>
enable_notificationsboolean
show_balanceboolean
Example
{
  "id": 123,
  "user_id": 0,
  "balance": 129900,
  "credit_limit": 0,
  "enable_notifications": true,
  "show_balance": true
}

WalletCard

object

Object representing a Wallet Card

idinteger<int64>

Unique identifier

wallet_idinteger<int64>
wallet_account_idinteger<int64>
namestring

Display name

icon_urlstring
balancenumber<double>
credit_limitnumber<double>
activeboolean
Example
{
  "id": 123,
  "wallet_id": 0,
  "wallet_account_id": 0,
  "name": "Example Name",
  "icon_url": "string",
  "balance": 0,
  "credit_limit": 0,
  "active": true
}

WalletAccount

object

Object representing a Wallet Account

idinteger<int64>

Unique identifier

team_idinteger<int64>
namestring

Display name

card_namestring
phonestring
vendor_referencestring
icon_urlstring
descriptionstring

Human-friendly description

enable_chatboolean
enable_integrationsboolean
activeboolean
Example
{
  "id": 123,
  "team_id": 0,
  "name": "Example Name",
  "card_name": "string",
  "phone": "string",
  "vendor_reference": "string",
  "icon_url": "string",
  "description": "Short description",
  "enable_chat": true,
  "enable_integrations": true,
  "active": true
}

WalletTransactionInput

object

Object for creating or updating a Wallet Transaction

wallet_card_idinteger<int64>required
wallet_account_idinteger<int64>required
addon_idinteger<int64>
addon_install_idinteger<int64>
payee_namestring
amountnumber<double>required
Example
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "amount": 0
}

WalletTransaction

object

Object representing a Wallet Transaction

wallet_card_idinteger<int64>
wallet_account_idinteger<int64>
addon_idinteger<int64>
addon_install_idinteger<int64>
payee_namestring
icon_urlstring
invoice_urlstring
statusstringpendingpaidrefundedfailed

Transaction status

amountnumber<double>
vendor_referencestring
Example
{
  "wallet_card_id": 0,
  "wallet_account_id": 0,
  "addon_id": 0,
  "addon_install_id": 0,
  "payee_name": "string",
  "icon_url": "string",
  "invoice_url": "string",
  "status": "active",
  "amount": 0,
  "vendor_reference": "string"
}

VendorOrderItemInput

object

Object for creating or updating an VendorOrderItem.

orderable_idinteger<int64>
orderable_typestring
quantityinteger<int64>
Example
{
  "orderable_id": 0,
  "orderable_type": "string",
  "quantity": 0
}

VendorOrderInput

object

Object for creating or updating an VendorOrder.

assignee_idinteger<int64>
assignee_team_idinteger<int64>
namestring

Display name

statusstring

Current status

canceledboolean
dataobject
event_attributesobject

Object for creating or updating an Event.

Show child attributes
kindstring
titlestring

Human-friendly title

detailsstring
location_namestring
colorstring
start_atstring<date-time>
end_atstring<date-time>
coupon_idsArray<integer>

Array coupon IDs.

order_items_attributesArray<object>
Show child attributes
orderable_idinteger<int64>
orderable_typestring
quantityinteger<int64>
Example
{
  "assignee_id": 0,
  "assignee_team_id": 0,
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {},
  "event_attributes": {
    "kind": "string",
    "title": "Example Title",
    "details": "string",
    "location_name": "string",
    "color": "string",
    "start_at": "2024-01-15T09:30:00Z",
    "end_at": "2024-01-15T09:30:00Z"
  },
  "coupon_ids": [
    0
  ],
  "order_items_attributes": [
    {
      "orderable_id": 0,
      "orderable_type": "string",
      "quantity": 0
    }
  ]
}

VendorOrder

object

Object that represents an VendorOrder.

idinteger<int64>

Unique identifier

user_idinteger<int64>required
team_idinteger<int64>
assignee_idinteger<int64>
event_idinteger<int64>
wallet_transaction_idinteger<int64>
workforce_shift_idinteger<int64>
coupon_idsArray<integer>

Array coupon IDs.

namestring

Display name

statusstring

Current status

canceledboolean
dataobject
Example
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "wallet_transaction_id": 0,
  "workforce_shift_id": 0,
  "coupon_ids": [
    0
  ],
  "name": "Example Name",
  "status": "active",
  "canceled": true,
  "data": {}
}

WorkforceInput

object

Object for updating a Workforce account

namestring

Display name

week_startstringmondayturesdaywednesday
timeclock_require_gpsboolean
timeclock_require_photoboolean
timeclock_enable_mobileboolean
timeclock_enable_webboolean
timeclock_enable_kioskboolean
timesheets_rounding_methodstringnoneupdownnearest
timesheets_rounding_minutesinteger
timesheets_enable_break_roundingboolean
shift_upcoming_notification_minutesinteger

Minutes before shift start to send notification

shift_forgot_clockin_minutesinteger

Minutes after shift start to send forgot clockin notification

shift_forgot_clockout_minutesinteger

Minutes after shift end to send forgot clockout notification

shift_notifications_enabledboolean

Enable/disable shift notifications

event_notifications_enabledboolean

Enable/disable event notifications

dataobject

Arbitrary data storage

Example
{
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": true,
  "timeclock_require_photo": true,
  "timeclock_enable_mobile": true,
  "timeclock_enable_web": true,
  "timeclock_enable_kiosk": true,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": true,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": true,
  "event_notifications_enabled": true,
  "data": {}
}

Workforce

object

Object representing a Workforce account

Object for updating a Workforce account

namestring

Display name

week_startstringmondayturesdaywednesday
timeclock_require_gpsboolean
timeclock_require_photoboolean
timeclock_enable_mobileboolean
timeclock_enable_webboolean
timeclock_enable_kioskboolean
timesheets_rounding_methodstringnoneupdownnearest
timesheets_rounding_minutesinteger
timesheets_enable_break_roundingboolean
shift_upcoming_notification_minutesinteger

Minutes before shift start to send notification

shift_forgot_clockin_minutesinteger

Minutes after shift start to send forgot clockin notification

shift_forgot_clockout_minutesinteger

Minutes after shift end to send forgot clockout notification

shift_notifications_enabledboolean

Enable/disable shift notifications

event_notifications_enabledboolean

Enable/disable event notifications

dataobject

Arbitrary data storage

idinteger<int64>
Example
{
  "name": "Example Name",
  "week_start": "monday",
  "timeclock_require_gps": true,
  "timeclock_require_photo": true,
  "timeclock_enable_mobile": true,
  "timeclock_enable_web": true,
  "timeclock_enable_kiosk": true,
  "timesheets_rounding_method": "none",
  "timesheets_rounding_minutes": 0,
  "timesheets_enable_break_rounding": true,
  "shift_upcoming_notification_minutes": 0,
  "shift_forgot_clockin_minutes": 0,
  "shift_forgot_clockout_minutes": 0,
  "shift_notifications_enabled": true,
  "event_notifications_enabled": true,
  "data": {},
  "id": 0
}

WorkforceEmployeeInput

object

Object for updating an employee

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

has_vehicleboolean
compliance_checkstring
notesstring
Example
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "has_vehicle": true,
  "compliance_check": "string",
  "notes": "string"
}

WorkforceEmployee

object

Object representing an employee

Object that represents a Team Member

Object for creating or updating a Team Member

user_idinteger<int64>required
team_idinteger<int64>required
favoriteboolean
muteboolean
photostring<binary>
rolesArray<string>

Array of roles assigned to the Team Member

locationsArray<string>

Array of locations assigned to the Team Member

tagsArray<string>

Array of tags assigned to the Team Member

idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
first_namestring
last_namestring
emailstring
mobilestring
managerboolean
memberboolean

True when the team member has signed up to Tommy

statusstring
icon_urlstring
addon_linksArray<any>

Array of profile links accessible by the current User on the Team Member profile

Show child attributes
titlestring

Human-friendly title

packagestring
urlstring
icon_urlstring
Example
{
  "user_id": 0,
  "team_id": 0,
  "favorite": true,
  "mute": true,
  "photo": "<binary>",
  "roles": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "mobile": "string",
  "manager": true,
  "member": true,
  "status": "string",
  "icon_url": "string",
  "addon_links": [
    {
      "title": "Example Title",
      "package": "string",
      "url": "string",
      "icon_url": "string"
    }
  ]
}

WorkforceAvailabilityInput

object

Object for updating a availability

aminteger
pminteger
ndinteger
am_lockedboolean
pm_lockedboolean
nd_lockedboolean
datestring<date>
Example
{
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": true,
  "pm_locked": true,
  "nd_locked": true,
  "date": "2024-01-15"
}

WorkforceAvailability

object

Object representing a availability

Object for updating a availability

aminteger
pminteger
ndinteger
am_lockedboolean
pm_lockedboolean
nd_lockedboolean
datestring<date>
idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
employee_idinteger<int64>
Example
{
  "am": 0,
  "pm": 0,
  "nd": 0,
  "am_locked": true,
  "pm_locked": true,
  "nd_locked": true,
  "date": "2024-01-15",
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "employee_id": 0
}

WorkforceShiftQuestion

object

Object representing a shift question

team_idinteger<int64>
textstring
offset_minutesinteger<int64>
whenstringalwaysstart_shiftend_shift
alwaysboolean
enabledboolean
tag_idsArray<integer>
Example
{
  "team_id": 0,
  "text": "string",
  "offset_minutes": 0,
  "when": "always",
  "always": true,
  "enabled": true,
  "tag_ids": [
    0
  ]
}

WorkforceShiftAnswer

object

Object representing a shift answer

team_idinteger<int64>
shift_idinteger<int64>
shift_question_idinteger<int64>
attendance_idinteger<int64>
user_idinteger<int64>
textstring
Example
{
  "team_id": 0,
  "shift_id": 0,
  "shift_question_id": 0,
  "attendance_id": 0,
  "user_id": 0,
  "text": "string"
}

WorkforceShiftInput

object

Object for updating a shift

titlestring

Human-friendly title

start_atstring<date-time>
end_atstring<date-time>
statusstringopenassignedpublished

Current status

location_idinteger<int64>
location_namestring
rolestring
departmentstring
detailsstring
dataobject
Example
{
  "title": "Example Title",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T09:30:00Z",
  "status": "active",
  "location_id": 0,
  "location_name": "string",
  "role": "string",
  "department": "string",
  "details": "string",
  "data": {}
}

WorkforceShift

object

Object representing a shift

idinteger<int64>

Unique identifier

user_idinteger<int64>
team_idinteger<int64>
assignee_idinteger<int64>
event_idinteger<int64>
shift_on_same_dayboolean
shift_requestedboolean
Example
{
  "id": 123,
  "user_id": 0,
  "team_id": 0,
  "assignee_id": 0,
  "event_id": 0,
  "shift_on_same_day": true,
  "shift_requested": true
}

WorkforceShiftRequestInput

object

Object for updating a shift request

user_idinteger<int64>
shift_idinteger<int64>
statusstringrequestedshortlistedapprovedrejectedcanceled

Current status

Example
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active"
}

WorkforceShiftRequest

object

Object representing a shift request

Object for updating a shift request

user_idinteger<int64>
shift_idinteger<int64>
statusstringrequestedshortlistedapprovedrejectedcanceled

Current status

idinteger<int64>
team_idinteger<int64>
requestor_idinteger<int64>
Example
{
  "user_id": 0,
  "shift_id": 0,
  "status": "active",
  "id": 0,
  "team_id": 0,
  "requestor_id": 0
}

WorkforceTimesheetInput

object

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean
Example
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true
}

WorkforceTimesheetBulkInput

object

Object for bulk updating a timesheets

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean
timesheet_idsArray<integer>
Example
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "timesheet_ids": [
    0
  ]
}

WorkforceTimesheet

object

Object representing a timesheet

Object for updating a timesheet

statusstringunsubmittedsubmittedpreapprovedapproveddenied

Current status

resource_idinteger<int64>
resource_typestring
start_datestring<date>
end_datestring<date>
manualboolean
idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
Example
{
  "status": "active",
  "resource_id": 0,
  "resource_type": "string",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0
}

WorkforceTimesheetItemInput

object

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean
Example
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true
}

WorkforceTimesheetItem

object

Object representing a timesheet item

Object for updating a timesheet item

shift_idinteger<int64>
timesheet_idinteger<int64>
work_hoursnumber<float>
break_hoursnumber<float>
addressstring
manualboolean
idinteger<int64>
user_idinteger<int64>
team_idinteger<int64>
activeboolean
Example
{
  "shift_id": 0,
  "timesheet_id": 0,
  "work_hours": 0,
  "break_hours": 0,
  "address": "string",
  "manual": true,
  "id": 0,
  "user_id": 0,
  "team_id": 0,
  "active": true
}

WorkforceAttendanceInput

object

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject
Example
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {}
}

WorkforceAttendance

object

Object representing an attendance

Object for updating an attendance

event_idinteger<int64>
latitudenumber<float>
longitudenumber<float>
accuracynumber<float>
statusstringstartpauseresumestop

Current status

addressstring
location_namestring
imageobject
idinteger<int64>
user_idinteger<int64>
Example
{
  "event_id": 0,
  "latitude": 0,
  "longitude": 0,
  "accuracy": 0,
  "status": "active",
  "address": "string",
  "location_name": "string",
  "image": {},
  "id": 0,
  "user_id": 0
}

Device

object

User device

idinteger<int64>

Unique device identifier

user_idinteger<int64>required
platformstringiosandroidrequired

Device platform type

environmentstringdevelopmentproduction

Device build environment

uuidstringrequired

Device UUID

tokenstring

Device token

Example
{
  "id": 444,
  "user_id": 0,
  "platform": "ios",
  "environment": "development",
  "uuid": "string",
  "token": "xxxx-yyyy-zzzz"
}

Tag

object

Object that represents a Tag.

idinteger<int64>required

Unique tag identifier

namestring

Tag name

taggings_countinteger
Example
{
  "id": 555,
  "name": "priority",
  "taggings_count": 0
}

TaggingInput

object

Object for creating a Tagging.

contextstringmemberstagsroleslocations

Tagging type

namestring

Display name

Example
{
  "context": "members",
  "name": "Example Name"
}

Tagging

object

Object that represents a Tagging.

Object for creating a Tagging.

contextstringmemberstagsroleslocations

Tagging type

namestring

Display name

idinteger<int64>
Example
{
  "context": "members",
  "name": "Example Name",
  "id": 0
}

Sync

object

A representation of a Sync operation

idinteger<int64>required

Unique identifier

team_idinteger<int64>
user_idinteger<int64>
integration_idinteger<int64>
statusstringpendingprocessingfailedcanceledcompleterequired

Current status of the sync

directionstringimportexport

Direction of the sync

item_typestringrequired

Type of items being synced

progress_percentagenumber<float>

Progress percentage (0-100)

total_itemsinteger<int64>

Total number of items to process

success_itemsinteger<int64>

Number of successfully processed items

failed_itemsinteger<int64>

Number of failed items

optionsobject

Options used for the sync operation

messagestring

Error message if sync failed

started_atstring<date-time>

When the sync started

ended_atstring<date-time>

When the sync ended

created_atstring<date-time>

When the sync was created

updated_atstring<date-time>

When the sync was last updated

userobject

User who initiated the sync

Show child attributes
idinteger<int64>
namestring
emailstring
Example
{
  "id": 123,
  "team_id": 0,
  "user_id": 0,
  "integration_id": 0,
  "status": "active",
  "direction": "import",
  "item_type": "string",
  "progress_percentage": 0,
  "total_items": 0,
  "success_items": 0,
  "failed_items": 0,
  "options": {},
  "message": "string",
  "started_at": "2024-01-15T09:30:00Z",
  "ended_at": "2024-01-15T09:30:00Z",
  "created_at": "2025-01-01T12:00:00.000Z",
  "updated_at": "2025-01-02T12:00:00.000Z",
  "user": {
    "id": 0,
    "name": "string",
    "email": "string"
  }
}

Error

object

Standard error format

errorbooleanrequired

Indicates the response represents an error

codestringrequired

Stable application error code

messagestringrequired

Client-facing error message

request_idstringrequired

Request correlation identifier

detailsobject

Optional field-level validation errors

Example
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Validation failed",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "details": {
    "field": [
      "is invalid"
    ]
  }
}

object

object
object
Example
{}