> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invoca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advertiser Users

export const MethodTag = ({method = "GET", path, label, colors = {}}) => {
  const presets = {
    get: {
      label: "GET",
      light: {
        bg: "#DCFCE7",
        text: "#15803D"
      },
      dark: {
        bg: "rgba(34,197,94,0.16)",
        text: "#4ADE80"
      }
    },
    post: {
      label: "POST",
      light: {
        bg: "#DBEAFE",
        text: "#1D4ED8"
      },
      dark: {
        bg: "rgba(59,130,246,0.16)",
        text: "#60A5FA"
      }
    },
    put: {
      label: "PUT",
      light: {
        bg: "#FEF3C7",
        text: "#B45309"
      },
      dark: {
        bg: "rgba(245,158,11,0.16)",
        text: "#FBBF24"
      }
    },
    patch: {
      label: "PATCH",
      light: {
        bg: "#F3E8FF",
        text: "#7E22CE"
      },
      dark: {
        bg: "rgba(168,85,247,0.16)",
        text: "#C084FC"
      }
    },
    delete: {
      label: "DEL",
      light: {
        bg: "#FEE2E2",
        text: "#B91C1C"
      },
      dark: {
        bg: "rgba(239,68,68,0.16)",
        text: "#F87171"
      }
    }
  };
  const fallback = {
    label: String(method).toUpperCase(),
    light: {
      bg: "#F3F4F6",
      text: "#374151"
    },
    dark: {
      bg: "rgba(156,163,175,0.16)",
      text: "#D1D5DB"
    }
  };
  const preset = presets[String(method).toLowerCase()] || fallback;
  const light = {
    ...preset.light,
    ...colors.light || ({})
  };
  const dark = {
    ...preset.dark,
    ...colors.dark || ({})
  };
  const css = `
    .invoca-method-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-right: 8px;
      border-radius: 8px;
      font-size: 10px;
      line-height: 18px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      vertical-align: middle;
      background: var(--imt-bg);
      color: var(--imt-fg);
    }
    .invoca-method-path {
      font-size: 13px;
    }
    [data-component-part="accordion-icon"]:has(.invoca-method-tag) {
      width: auto;
      height: auto;
      flex-shrink: 0;
    }
    [data-component-part="accordion-icon"] .invoca-method-tag {
      margin-right: 0;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) {
      flex-wrap: wrap;
      row-gap: 6px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-icon"] {
      flex: 1 1 0;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title-container"] {
      flex: 0 0 calc(100% - 8px);
      padding-left: 20px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title"] {
      font-size: 12px;
    }
    .dark .invoca-method-tag,
    [data-theme="dark"] .invoca-method-tag {
      background: var(--imt-bg-dark);
      color: var(--imt-fg-dark);
    }
  `;
  const vars = {
    "--imt-bg": light.bg,
    "--imt-fg": light.text,
    "--imt-bg-dark": dark.bg,
    "--imt-fg-dark": dark.text
  };
  return <span>
      <style>{css}</style>
      <span className="invoca-method-tag" style={vars}>
        {label || preset.label}
      </span>
      {path ? <code className="invoca-method-path">{path}</code> : null}
    </span>;
};

For convenience, the API provides an interface for performing operations on specific advertiser users. This is useful for situations where it is inconvenient to send an array of all existing advertiser users. Actions for this endpoint can only be taken on users with value of false for `<can_login_via_platform>` field, indicating that the user’s authentication is managed by the network (and has access to the Invoca platform using SSO).

Endpoint:

`https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/users/<user_id_from_network>.json`

<AccordionGroup>
  <Accordion title="Get all Advertiser Users for Advertiser" icon={<MethodTag method="get" path="/advertisers/<advertiser_id>/users"/>}>
    #### Examples

    Read all advertiser users for advertiser e0Fv6YEk

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/e0Fv6YEk/users.json`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    [
      {
        "email_settings": [
          { "email_address": "chris@nfltix.com", "use_for_notifications": true }
        ],
        "id_from_network": "549494858585Dxlj2uCX0ijqXP4nAW",
        "first_name": "Chris",
        "contact_country_code": "1",
        "last_name": "Dean",
        "role": "Manager",
        "oauth_refresh_token": "556588585858585858585858858",
        "contact_phone_number": "888-603-3760",
        "notify_on_budgets": true,
        "notify_on_campaign_applications": false,
        "notify_on_campaign_expirations": false,
        "notify_on_creative_duplication_requests": true,
        "notify_on_network_announcements": true,
        "notify_on_performance_notifications": false,
        "notify_on_monthly_campaign_performance_reports": true,
        "notify_on_weekly_campaign_performance_reports": false,
        "notify_on_call_activities": true,
        "can_login_via_platform": false
      }
    ]
    ```
  </Accordion>

  <Accordion title="Get an Advertiser User" icon={<MethodTag method="get" path="/advertisers/<advertiser_id>/users/<user_id>"/>}>
    #### Examples

    Read a specific advertiser user

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/e0Fv6YEk/users/549494858585Dxlj2uCX0ijqXP4nAW.json`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    {
      "email_settings": [
        { "email_address": "chris@nfltix.com", "use_for_notifications": true }
      ],
      "id_from_network": "549494858585Dxlj2uCX0ijqXP4nAW",
      "first_name": "Chris",
      "contact_country_code": "1",
      "last_name": "Dean",
      "role": "Manager",
      "oauth_refresh_token": "556588585858585858585858858",
      "contact_phone_number": "888-603-3760",
      "notify_on_budgets": true,
      "notify_on_campaign_applications": false,
      "notify_on_campaign_expirations": false,
      "notify_on_creative_duplication_requests": true,
      "notify_on_network_announcements": true,
      "notify_on_performance_notifications": false,
      "notify_on_monthly_campaign_performance_reports": true,
      "notify_on_weekly_campaign_performance_reports": false,
      "notify_on_call_activities": true,
      "can_login_via_platform": false
    }
    ```
  </Accordion>

  <Accordion title="Create an Advertiser User" icon={<MethodTag method="post" path="/advertisers/<advertiser_id>/users"/>}>
    #### Examples

    Create an advertiser user

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/e0Fv6YEk/users.json`

    Request Body:

    ```json theme={null}
    {
      "user": {
        "id_from_network": "549494858585Dxlj2uCX0ijqXP4nAW",
        "email_settings": [
          { "email_address": "chris@nfltix.com", "use_for_notifications": true }
        ],
        "first_name": "Chris",
        "last_name": "Dean",
        "contact_phone_number": "805-555-5555",
        "oauth_refresh_token": "556588585858585858585858858",
        "role": "Manager",
        "notify_on_budgets": true,
        "notify_on_campaign_applications": false,
        "notify_on_campaign_expirations": false,
        "notify_on_creative_duplication_requests": true,
        "notify_on_network_announcements": true,
        "notify_on_performance_notifications": false,
        "notify_on_monthly_campaign_performance_reports": true,
        "notify_on_weekly_campaign_performance_reports": false,
        "notify_on_call_activities": true
      }
    }
    ```
  </Accordion>

  <Accordion title="Update an Advertiser User" icon={<MethodTag method="put" path="/advertisers/<advertiser_id>/users/<user_id>"/>}>
    #### Examples

    Update an Advertiser User

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/e0Fv6YEk/users/<user_id>`

    Request Body:

    ```json theme={null}
    {
      "user": {
        "email_settings": [
          { "email_address": "chris@nfltix.com", "use_for_notifications": true }
        ],
        "id_from_network": "549494858585Dxlj2uCX0ijqXP4nAW",
        "first_name": "Chris",
        "contact_country_code": "1",
        "last_name": "Dean",
        "role": "Manager",
        "oauth_refresh_token": "556588585858585858585858858",
        "contact_phone_number": "888-603-3760",
        "notify_on_budgets": true,
        "notify_on_campaign_applications": false,
        "notify_on_campaign_expirations": false,
        "notify_on_creative_duplication_requests": true,
        "notify_on_network_announcements": true,
        "notify_on_performance_notifications": false,
        "notify_on_monthly_campaign_performance_reports": true,
        "notify_on_weekly_campaign_performance_reports": false,
        "notify_on_call_activities": true
      }
    }
    ```
  </Accordion>

  <Accordion title="Delete an Advertiser User" icon={<MethodTag method="delete" path="/advertisers/<advertiser_id>/users/<user_id>"/>}>
    #### Examples

    Delete an advertiser user

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/e0Fv6YEk/users/549494858585Dxlj2uCX0ijqXP4nAW.json`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>
