Skip to main content
PUT
/
v1
/
scouting
/
tasks
/
{scout_id}
/
email-settings
Update Email Settings
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "skip_email": true
}
'
{
  "scout_id": "<string>",
  "skip_email": true,
  "message": "<string>"
}

Overview

Manage email notification settings and subscriber lists for a scout. All fields are optional - provide only what you want to change.

Permissions

  • Scout creators: Can update all settings and manage all subscribers
  • Non-creators: Can only unsubscribe themselves

Use Cases

1. Toggle Email Notifications Only

Disable email notifications while keeping subscribers:
Request
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "skip_email": true
  }'
Response
{
  "scout_id": "123e4567-e89b-12d3-a456-426614174000",
  "skip_email": true,
  "message": "Email notifications disabled"
}

2. Add Subscribers Only

Subscribe multiple emails without changing notification settings:
Request
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "subscribers_to_add": [
      "[email protected]",
      "[email protected]",
      "[email protected]"
    ]
  }'
Response
{
  "scout_id": "123e4567-e89b-12d3-a456-426614174000",
  "subscribers_added": [
    {"email": "[email protected]", "status": "added"},
    {"email": "[email protected]", "status": "already_subscribed"},
    {"email": "[email protected]", "status": "added"}
  ],
  "message": "Added 2 subscriber(s)"
}

3. Unsubscribe Yourself (Non-creator)

If you’re not the scout creator, you can unsubscribe yourself:
Request
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "subscribers_to_remove": ["[email protected]"]
  }'
Response
{
  "scout_id": "123e4567-e89b-12d3-a456-426614174000",
  "subscribers_removed": [
    {"email": "[email protected]", "status": "removed"}
  ],
  "message": "Removed 1 subscriber(s)"
}

4. Remove Multiple Subscribers (Creator Only)

Scout creators can remove any subscribers:
Request
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "subscribers_to_remove": [
      "[email protected]",
      "[email protected]"
    ]
  }'
Response
{
  "scout_id": "123e4567-e89b-12d3-a456-426614174000",
  "subscribers_removed": [
    {"email": "[email protected]", "status": "removed"},
    {"email": "[email protected]", "status": "removed"}
  ],
  "message": "Removed 2 subscriber(s)"
}

5. Combined Update

Update multiple settings at once:
Request
curl --request PUT \
  --url https://api.yutori.com/v1/scouting/tasks/{scout_id}/email-settings \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "skip_email": false,
    "subscribers_to_add": ["[email protected]"],
    "subscribers_to_remove": ["[email protected]"]
  }'
Response
{
  "scout_id": "123e4567-e89b-12d3-a456-426614174000",
  "skip_email": false,
  "subscribers_added": [
    {"email": "[email protected]", "status": "added"}
  ],
  "subscribers_removed": [
    {"email": "[email protected]", "status": "removed"}
  ],
  "message": "Email notifications enabled; Added 1 subscriber(s); Removed 1 subscriber(s)"
}

Error Responses

403 Forbidden - Permission Denied

Non-creator trying to add subscribers:
{
  "detail": "Only scout creator can add subscribers"
}
Non-creator trying to remove someone else:
{
  "detail": "You can only unsubscribe yourself. Your email: [email protected]"
}

400 Bad Request - Validation Errors

No fields provided:
{
  "detail": "At least one field must be provided"
}
Too many emails:
{
  "detail": "Maximum 200 subscribers per request"
}

404 Not Found

{
  "detail": "Scout with id {scout_id} not found"
}

Response Field Descriptions

SubscriberResult Status Values

StatusDescription
addedEmail was successfully subscribed
removedEmail was successfully unsubscribed
already_subscribedEmail was already subscribed (not an error)
not_foundEmail was not found in subscriber list (for removal)
invalidEmail format is invalid
permission_deniedUser lacks permission to perform this operation

Notes

  • Email addresses are automatically normalized (lowercased and trimmed)
  • Duplicate emails in a single request are automatically removed
  • Adding an already-subscribed email returns already_subscribed status (not an error)
  • Removing a non-existent subscription returns not_found status (not an error)
  • Maximum 200 email addresses per request for subscribers_to_add
  • All operations are idempotent - safe to retry

Authorizations

x-api-key
string
header
required

Path Parameters

scout_id
string<uuid>
required

Body

application/json
skip_email
boolean
required
If true, email notifications will be skipped and only webhook notifications will be sent.
If false, both email and webhook notifications will be sent (default behavior).

Response

Successful Response

scout_id
string
required

The ID of the scout

skip_email
boolean
required

Whether email notifications are skipped

message
string
required

Confirmation message