Add sender.

def new_sender(project_id):
    """Add sender."""

    project = get_data_or_404('project', project_id)

    if project['owner_id'] != get_current_user_id():
        return jsonify(message='forbidden'), 403

    form = NewSenderForm()
    if not form.validate_on_submit():
        return jsonify(errors=form.errors), 400

    data = form.data
    data['project_id'] = project_id
    data['token'] = password_generator(40)

    id = add_instance('sender', **data)

    if not id:
        return jsonify(errors={'name': ['duplicated slug.']}), 400

    sender = get_data_or_404('sender', id, 'sensitive')

    return jsonify(**sender)