def create_draft(client, record, headers):
    """Create draft ready for file attachment and return its id."""
    record["files"] = {"enabled": True}
    response = client.post("/records", json=record, headers=headers)
    assert response.status_code == 201
    return response.json['id']