Skip to main content
POST
/
api
/
favorites
/
toggle
/
{entity_type}
/
{entity_id}
Toggle favorite
curl --request POST \
  --url https://api.morphic.io/api/favorites/toggle/{entity_type}/{entity_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "entity_name": "<string>"
}
'
{}

Authorizations

X-API-Key
string
header
required

API key (sk_xxx) from Developer Settings. No X-Account-ID needed.

Headers

x-account-id
string | null

Path Parameters

entity_type
string
required
entity_id
string<uuid>
required

Body

application/json
entity_name
string | null

Custom name for the favorite

Maximum string length: 255

Response

Successful Response

The response is of type Response Toggle-Favorite · object.