Get Share Link
GET
/api/v1/workspaces/{workspace_id}/emails/{email_id}/share_link
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/share_link';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/share_link \ --header 'Authorization: Bearer <token>'Retrieves the email’s share link. Returns not found if the email has never been shared.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
email_id
required
integer
Email ID
Responses
Section titled “ Responses ”Successful
Media typeapplication/json
object
id
required
integer
email_id
required
integer
url
required
The public link to send to guests.
string
expires_at
required
string format: date-time
enabled
required
Whether link sharing is on. The link only works while this is true and it hasn’t expired.
boolean
active
required
Whether the link works right now, i.e. sharing is on and the link hasn’t expired.
boolean
invitations
required
People the share link has been emailed to.
Array<object>
object
id
required
integer
email
required
string
invited_by
required
created_at
required
string format: date-time
created_by
required
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "id": 12345, "email_id": 12345, "url": "https://app.emailshepherd.com/share/pQ9sN3vXk2mB7tR4wY8zA1cD5fG6hJ0e", "expires_at": "2020-01-31T00:00:00Z", "enabled": true, "active": true, "invitations": [ { "id": 12345, "email": "client@example.com", "invited_by": { "type": "User", "id": 12345, "first_name": "John", "last_name": "Smith", "profile_image_url": "https://example.com/profile.jpg" }, "created_at": "2020-01-01T00:00:00Z" } ], "created_by": { "type": "User", "id": 12345, "first_name": "John", "last_name": "Smith", "profile_image_url": "https://example.com/profile.jpg" }, "created_at": "2020-01-01T00:00:00Z", "updated_at": "2020-01-01T00:00:00Z"}Unauthorized
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Forbidden
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Not Found
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}