---
title: Accept Invites
slug: docs/demo/accept-invites
description: Learn how to make a POST request to the fictive.com API using the curl command. This code example shows how to send a request to the '/accounts/groups/invites' endpoint with JSON headers and payload. Get step-by-step instructions to include an empty "invi
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "cAHnJdhvN7A1Wz6-6ITrZ",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/groups/invites",
    "name": "Accept Invites",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "request",
          "type": "object",
          "schema": [
            {
              "kind": "optional",
              "name": "inviteToken",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AcceptInviteToken",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AcceptInviteToken",
          "isExpanded": true
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "accountGroupToken",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "subscriptionReferences",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "itemExample": ""
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountGroupAcceptedInvitation",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountGroupAcceptedInvitation",
            "isExpanded": true
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "No Content",
        "jsonExample": "{\n  \"accountGroupToken\": \"DCFBED03-132E-4D08-BF85-35F94671E3E7\",\n  \"subscriptionReferences\": [\n    \"ASJDKAS6712KABCD\",\n    \"ASJDKAS6712KDDEQ\",\n    \"ASJDKAS6712KEWQQ\"\n  ]\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "403",
        "description": "Unable to authenticate using the provided session.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Account Group token not found.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will enable you to accept an invitation to an account group, and optionally, an account group subscription.",
    "examples": {
      "languages": [
        {
          "id": "FfpjsUb6CKicHmln0Szjl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/accounts/groups/invites \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "mNWxcBPEZY-C8wlbBSbkf",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/groups/invites\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "K2YQ90jyjUXs8DbF66CUP",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/groups/invites\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "GwDmmuqvkIrJJSK7vUY6O",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/groups/invites\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FfpjsUb6CKicHmln0Szjl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"accountGroupToken\": \"DCFBED03-132E-4D08-BF85-35F94671E3E7\",\n  \"subscriptionReferences\": [\n    \"ASJDKAS6712KABCD\",\n    \"ASJDKAS6712KDDEQ\",\n    \"ASJDKAS6712KEWQQ\"\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Request is invalid.\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Unable to authenticate using the provided session.\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Account Group token not found.\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}