# Create a connection: Accept an invitation

## From the Holder

{% hint style="warning" %}
In Postman, switch to the Holder collection
{% endhint %}

* You got the invitation during the previous step "[Create an invitation](https://docs-v1.archipels.io/archipels-documentation/issue-attestation/broken-reference)",&#x20;

{% hint style="info" %}

* or you can get the invitation from the catalog (when available):

```
    {       
         "schema": {
            "icon": "https://connect-prod.s3.fr-par.scw.cloud/icons/attestations/wallet/email.svg",
            "did": "5gP2EpQA2dtHMRtAxvXRK7:2:Email attestation:1.0",
            "name": "Email attestation",
            "attributes": [
                "emailAddress"
            ]
        },
        "source": {
            "name": "Archipels",
            "logoUrl": null
        },
        "issuer": {
            "did": "Gjr2SvNwhHe3ZhmUNjKqHT",
            "name": "Archipels",
            "logoUrl": "https://assets-global.website-files.com/603d1ab751f8514b6baee231/6560a7750cfd09f96fe26e44_Archipels%20C%20H%20Logo%20(1).-p-500.png"
        },
        "message": "/email_attestation",
        "connectionInvitationLink": "eyJAdHlwZSI6ICJodHRwczovL2RpZGNvbW0ub3JnL291dC1vZi1iYW5kLzEuMS9pbnZpdGF0aW9uIiwgIkBpZCI6ICI5MmU0ZjZmYy0wZTEwLTQ4YmMtOWY3Yi03ZWU4ZmY4OGExOGMiLCAic2VydmljZXMiOiBbImRpZDpzb3Y6R2pyMlN2TndoSGUzWmhtVU5qS3FIVCJdLCAiaGFuZHNoYWtlX3Byb3RvY29scyI6IFsiaHR0cHM6Ly9kaWRjb21tLm9yZy9kaWRleGNoYW5nZS8xLjAiXSwgImxhYmVsIjogImlzc3VlciJ9",
        "logoUrl": "https://connect-prod.s3.fr-par.scw.cloud/icons/attestations/discover/email.svg"
    }   
```

***

* in the catalog, the invitation is connectionInvitationLink
  {% endhint %}

* Create a new POST request. Enter the value <mark style="background-color:orange;">{{base\_URL}}/connections/accept-invitation</mark>

* In the Body tab, then in the raw tab, copy this json (the invitation generated from the Issuer in the previous section [Create an invitation](https://docs-v1.archipels.io/archipels-documentation/issue-attestation/broken-reference)):

```
{
  "invitation": "eyJAdHlwZSI6ICJodHRwczovL2RpZGNvbW0ub3JnL291dC1vZi1iYW5kLzEuMS9pbnZpdGF0aW9uIiwgIkBpZCI6ICIzN2U5ODJhYS05MTVjLTQzNTUtOGI4My0xYmVlYWRmNWJhMDYiLCAiaGFuZHNoYWtlX3Byb3RvY29scyI6IFsiaHR0cHM6Ly9kaWRjb21tLm9yZy9kaWRleGNoYW5nZS8xLjAiXSwgImxhYmVsIjogImlzc3VlciIsICJzZXJ2aWNlcyI6IFsiZGlkOnNvdjphdmQ5TjNrQWpaWnA1bjRQMW9qYmYiXX0="
}
```

* save your request and click on `SEND`
* you will receive a message `202 Accepted`

## Check that the connection is active

* Create a new GET request.  Enter the value <mark style="background-color:orange;">{{base\_URL}}/connections</mark>&#x20;
* Save your request and click `SEND`

you will see your connection with the status "active" in the list of connections

```
    {
        "id": "694b8024-e34c-4aaa-b3c4-dd114f3cba4c",
        "status": "active",
        "contactDid": "avd9N3kAjZZp5n4P1ojbf"
    }
```

## From the Issuer

Once the holder send the accept-invitation, the issuer receives a webhook. Thank to this information you will be able to send the offer and automatize the processus.

```
{
  "payload": {
    "connectionId": "d557c7ae-9fbe-4677-a4aa-c1c700739806"
  },
  "timestamp": "2024-04-03T14:31:26.724Z",
  "type": "ConnectionInvitationAcceptanceReceived"
}
```
