# CodeSignal

> Screen candidates with CodeSignal: send assessment invitations, follow their sessions and scores, and set up live coding interviews.

App · 22 actions. Web page: https://docs.lodol.com/docs/integrations/codesignal

## Actions

### Archive a session

Archive a candidate's test session.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Change a session's time limit

Give one candidate a different time limit, in minutes.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.
- Time limit (minutes) (`duration_minutes`, number, required): The time limit, in minutes. At least 1.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Create a live interview

Create a live coding interview and get its link.

**Inputs**

- Candidate email (`candidate_email`, text): The candidate's email address.
- Candidate name (`candidate_name`, text): The candidate's full name.
- Template (`template_id`, text): The interview template to start from.
- Lock template (`lock_template`, true/false): Whether the template can't be changed during the interview.
- Interviewer ID (`interviewer_id`, text): The CodeSignal user ID of the interviewer.
- Team ID (`interview_team_id`, text): The ID of the team the interview belongs to.
- Expires in (hours) (`expires_in_hours`, number): How long the interview link works, from 1 to 336 hours. From 1 to 336.
- Track location (`track_candidate_location`, true/false): Whether to track the candidate's location from their IP address.
- Block copying (`disable_description_copy`, true/false): Whether to stop the candidate copying the question's description.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "candidateEmail": "example",
    "candidateId": "example",
    "candidateName": "example",
    "finishDate": 1,
    "id": "example",
    "interviewer": {
      "id": "example",
      "username": "example"
    },
    "proctoringStatus": "example",
    "shortenedUrl": "example",
    "startDate": 1,
    "status": "pending",
    "template": {
      "id": "example",
      "name": "example"
    },
    "url": "example"
  }
}
```

### Delete a live interview

Delete a live interview.

**Inputs**

- Interview ID (`interview_id`, text, required): The live interview's ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete a test session

Delete a candidate's test session, cancelling an invitation they haven't used.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.
- Email the candidate (`send_email`, true/false): Whether to email the candidate that it was cancelled.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Extend an invitation

Push back when an unstarted invitation expires. It can only be made later.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.
- Expires at (`expires_at`, date and time, required): When the invitation should now expire.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Get a live interview

Read a live interview: its candidate, status, links and dates.

**Inputs**

- Interview ID (`interview_id`, text, required): The live interview's ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "candidateEmail": "example",
    "candidateId": "example",
    "candidateName": "example",
    "finishDate": 1,
    "id": "example",
    "interviewer": {
      "id": "example",
      "username": "example"
    },
    "proctoringStatus": "example",
    "shortenedUrl": "example",
    "startDate": 1,
    "status": "pending",
    "template": {
      "id": "example",
      "name": "example"
    },
    "url": "example"
  }
}
```

### Get a test session

Read a candidate's test session: status, score, dates and the result link.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Get an assessment

Read one assessment (company test).

**Inputs**

- Assessment (`test_id`, text, required): The assessment (company test).

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "duration": 1,
    "externalTitle": "example",
    "id": "example",
    "internalDescription": "example",
    "labels": [
      "example"
    ],
    "title": "example"
  }
}
```

### Get the company

Read the CodeSignal company the API key belongs to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "alias": "example",
    "id": "example",
    "name": "example",
    "ownedEmailDomains": [
      "example"
    ],
    "status": "example"
  }
}
```

### Grade a question

Set the score for one question of a finished session, such as a free-text answer.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.
- Question ID (`question_id`, text, required): The question's (task's) ID.
- Score (`score`, number, required): The score to give. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Invite a candidate to an assessment

Create a test session for a candidate, which emails them an invitation unless you choose otherwise.

**Inputs**

- Assessment (`test_id`, text, required): The assessment to invite them to.
- Candidate email (`candidate_email`, text): The candidate's email address.
- First name (`candidate_first_name`, text): The candidate's first name.
- Last name (`candidate_last_name`, text): The candidate's last name.
- Don't email the invitation (`no_invitation_email`, true/false): Yes to create the session without emailing the candidate, for example to send the link yourself.
- Reuse an open invitation (`prefer_existing`, true/false): Yes to return the candidate's unfinished invitation to this assessment, if they have one, instead of a new one.
- Time limit (minutes) (`duration_minutes`, number): How long the candidate has, in minutes, in place of the assessment's own time limit. At least 1.
- Invitation lasts (hours) (`expires_in_hours`, number): How long the invitation lasts before it expires, in hours. At least 1.
- External ID (`external_id`, text): Your own ID for the candidate, such as an applicant ID. It comes back on the session.
- Redirect URL (`redirect_url`, text): Where to send the candidate when they finish.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### List an assessment's sessions

List the candidates' sessions of an assessment, most recently finished first.

**Inputs**

- Assessment (`test_id`, text, required): The assessment.
- Limit (`limit`, number): How many sessions to return, up to 100. From 1 to 100.
- Skip (`offset`, number): How many sessions to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_next_page": true,
    "items": [
      {
        "createDate": 1,
        "customDuration": 1,
        "expirationDate": 1,
        "externalId": "example",
        "finishDate": 1,
        "id": "example",
        "integrityReviewFinalized": true,
        "integrityReviewSuggested": true,
        "invitationUrl": "example",
        "labels": [
          "example"
        ],
        "maxScore": 1,
        "result": {
          "score": 1,
          "solvedTaskCount": 1,
          "url": "example"
        },
        "startDate": 1,
        "status": "pending",
        "taskCount": 1,
        "test": {
          "id": "example",
          "title": "example"
        },
        "testTaker": {
          "email": "example",
          "firstName": "example",
          "id": "example",
          "lastName": "example"
        },
        "verificationStatus": "pending"
      }
    ],
    "total_count": 1
  }
}
```

### List assessment labels

List the labels the company puts on its assessments.

**Inputs**

- Search (`search`, text): Only labels whose title contains these words.
- Limit (`limit`, number): How many labels to return, up to 100. From 1 to 100.
- Skip (`offset`, number): How many labels to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_next_page": true,
    "items": [
      {
        "title": "example",
        "variant": "example"
      }
    ],
    "total_count": 1
  }
}
```

### List assessments

List the company's assessments (company tests), or find them by title or label.

**Inputs**

- Title (`title`, text): Only assessments whose title contains these words.
- Labels (`labels`, list): Only assessments with all of these labels.
- Sort by (`sort_by`, text): What to sort by. Title if left empty. One of: `title`, `createDate` (Date created).
- Direction (`sort_direction`, text): The sort direction. Ascending if left empty. One of: `asc` (Ascending), `desc` (Descending).
- Limit (`limit`, number): How many assessments to return, up to 100. From 1 to 100.
- Skip (`offset`, number): How many assessments to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_next_page": true,
    "items": [
      {
        "createDate": 1,
        "duration": 1,
        "externalTitle": "example",
        "id": "example",
        "internalDescription": "example",
        "labels": [
          "example"
        ],
        "title": "example"
      }
    ],
    "total_count": 1
  }
}
```

### List interview templates

List the company's live interview templates, or find them by name.

**Inputs**

- Name (`name`, text): Only templates whose name contains these words.
- Limit (`limit`, number): How many templates to return, up to 100. From 1 to 100.
- Skip (`offset`, number): How many templates to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_next_page": true,
    "items": [
      {
        "canEdit": true,
        "defaultExpirationTime": 1,
        "hasAssociatedInterviews": true,
        "id": "example",
        "isCompanyDefault": true,
        "name": "example",
        "team": {
          "id": "example",
          "title": "example"
        }
      }
    ],
    "total_count": 1
  }
}
```

### List live interviews

List live interviews, or a candidate's interviews by their email.

**Inputs**

- Candidate email (`candidate_email`, text): Only this candidate's interviews.
- Limit (`limit`, number): How many interviews to return, up to 100. From 1 to 100.
- Skip (`offset`, number): How many interviews to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_next_page": true,
    "items": [
      {
        "candidateEmail": "example",
        "candidateId": "example",
        "candidateName": "example",
        "finishDate": 1,
        "id": "example",
        "interviewer": {
          "id": "example",
          "username": "example"
        },
        "proctoringStatus": "example",
        "shortenedUrl": "example",
        "startDate": 1,
        "status": "pending",
        "template": {
          "id": "example",
          "name": "example"
        },
        "url": "example"
      }
    ],
    "total_count": 1
  }
}
```

### Mark a session graded

Mark a session's result as fully graded.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Reactivate a session

Give a candidate whose session expired or ended another chance, as a new session.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.
- Email the candidate (`send_email`, true/false): Whether to email the candidate about it.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Resend an invitation

Email the candidate their test invitation again.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Unarchive a session

Bring back an archived test session.

**Inputs**

- Session ID (`session_id`, text, required): The candidate's test session ID.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "customDuration": 1,
    "expirationDate": 1,
    "externalId": "example",
    "finishDate": 1,
    "id": "example",
    "integrityReviewFinalized": true,
    "integrityReviewSuggested": true,
    "invitationUrl": "example",
    "labels": [
      "example"
    ],
    "maxScore": 1,
    "result": {
      "score": 1,
      "solvedTaskCount": 1,
      "url": "example"
    },
    "startDate": 1,
    "status": "pending",
    "taskCount": 1,
    "test": {
      "id": "example",
      "title": "example"
    },
    "testTaker": {
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example"
    },
    "verificationStatus": "pending"
  }
}
```

### Update a live interview

Change a live interview's candidate, template, interviewer or settings.

**Inputs**

- Interview ID (`interview_id`, text, required): The live interview's ID.
- Candidate email (`candidate_email`, text): The candidate's email address.
- Candidate name (`candidate_name`, text): The candidate's full name.
- Template (`template_id`, text): The interview template to start from.
- Lock template (`lock_template`, true/false): Whether the template can't be changed during the interview.
- Interviewer ID (`interviewer_id`, text): The CodeSignal user ID of the interviewer.
- Team ID (`interview_team_id`, text): The ID of the team the interview belongs to.
- Expires in (hours) (`expires_in_hours`, number): How long the interview link works, from 1 to 336 hours. From 1 to 336.
- Track location (`track_candidate_location`, true/false): Whether to track the candidate's location from their IP address.
- Block copying (`disable_description_copy`, true/false): Whether to stop the candidate copying the question's description.

**Outputs**

- `data` (object): The response from CodeSignal.

**Example output**

```json
{
  "data": {
    "candidateEmail": "example",
    "candidateId": "example",
    "candidateName": "example",
    "finishDate": 1,
    "id": "example",
    "interviewer": {
      "id": "example",
      "username": "example"
    },
    "proctoringStatus": "example",
    "shortenedUrl": "example",
    "startDate": 1,
    "status": "pending",
    "template": {
      "id": "example",
      "name": "example"
    },
    "url": "example"
  }
}
```
